my $regex = do { local $" = '|'; qr/(?:@regexes)/; }; my @matches = grep /$regex/, @array;
_________
broquaint
update: changed code re neilwatson's clarification
In reply to Re: Efficiency: Foreach loop and multiple regexs
by broquaint
in thread Efficiency: Foreach loop and multiple regexs
by neilwatson
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |