in reply to Efficiency: Foreach loop and multiple regexs
my $regex = do { local $" = '|'; qr/(?:@regexes)/; }; my @matches = grep /$regex/, @array;
_________
broquaint
update: changed code re neilwatson's clarification
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Efficiency: Foreach loop and multiple regexs
by RMGir (Prior) on Sep 13, 2002 at 14:37 UTC |