Randal L. Schwartz [RLS], on ,  , 2005 at 05:47 (-0700) wrote about:

RLS>       $wanted ||= $input =~ /$_/ for @filter;
RLS>       $wanted;
RLS>     } @input;

RLS> Note the use of ||= for short-circuiting the tests once a good filter
RLS> is found.  You can't use "return 1", because a grep/map block is not a
RLS> subroutine.

very nice example, thanks a lot.

-- 

How do you protect mail on web? I use http://www.2pu.net

["Just give me the original history, please!" -- Sam Beckett]



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to