in reply to Efficiency: Foreach loop and multiple regexs
For maximum efficiency make sure to sort the regex array by descending likelihood of a match.my @grep = map "grep /$_/,", qw/ regex1 regex2 . . regex 140 /; my @match = eval join ' ', @grep, '@array';
Makeshifts last the longest.
|
|---|