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 bl
> "Ing" == Ing Branislav Gerzo <[EMAIL PROTECTED]> writes:
Ing> Hi all,
Ing> let's we have:
Ing> use strict;
Ing> use warnings;
Ing> my @input = qw{ one two twentythree four };
Ing> my @filter = qw { one three five ten twenty };
Ing> my @filtered = ();
Ing> for my $in (@input) {
Ing> f