[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [FWP] Something like "grepfirst"



Salve J. Nilsen wrote:
> 
> How about
> 
>  $ perl -le 'while($_=shift){last if -d}print' /bar /tmp /foo /usr

That's no good, because it will always print one of the items, even
if none of them pass the -d test (in which case it prints the last one).

John Porter


==== Want to unsubscribe from Fun With Perl?  Well, if you insist...
==== Send email to <fwp-request@technofile.org> with message _body_
====   unsubscribe