Don't ask to ask, just ask | |
PerlMonks |
Re: grep with looped testsby betterworld (Curate) |
on Jun 06, 2014 at 15:31 UTC ( [id://1089044]=note: print w/replies, xml ) | Need Help?? |
$final = 0 if ( $r ); You need to change $r to $something =~ $r; Using a regex variable as an expression by itself will not do any matching.
It might be more efficient to drop the loop and build a combined expression like Maybe Regexp::Optimizer can make that long expression even faster.
In Section
Seekers of Perl Wisdom
|
|