![]() |
|
The stupid question is the question not asked | |
PerlMonks |
Re: Regex combining /(foo|bar)/ slower than using foreach (/foo/,/bar/) ???by samy_kumar (Scribe) |
on Feb 18, 2005 at 13:08 UTC ( #432311=note: print w/replies, xml ) | Need Help?? |
Hi,
I think the problem is with this line.
because perl compiles this patern again & again in the foreach loop. If you use this pattern instead of It will be fast. Since it compiles the pattern only once.
In Section
Seekers of Perl Wisdom
|
|