in reply to Re: matching an array of alternates
in thread matching an array of alternates
Just wanted to point out that if the file you're searching has a lot of lines, you can gain some speed by adding the "o" option to the regex; i.e.:
This way, the regular expression only has to be compiled once.print $1 if /$regex/o;
- Zoogie
In Section
Seekers of Perl Wisdom