[oclug] A Friday Regex Head Scratcher

Jon Earle je_oclug at kronos.honk.org
Thu Apr 23 09:35:27 EDT 2009



Dave O'Neill wrote:

> This generally won't be a problem for quickie commandline scripts that
> only run one or two regexes, but if you're writing something that
> performs a lot of regex matching, or that runs as a daemon, or under
> mod_perl or fastcgi, you should avoid using $&, $' and $`.  Or... if you
> really need them and are on Perl 5.10, use the newer equivalents that
> don't come with a global penalty.  See "man perlre" for more details.

Thanks for all the thoughts Dave.  I think it's still perl 5.8 but I'm not
logged on right now to check.  There's not a lot of regex matching in the
program but I'll note it for a future update to the app.

Cheers!
Jon



More information about the OCLUG mailing list