http://qs1969.pair.com?node_id=316211


in reply to Naughty Regular Expressions and mod_perl

sub killperformance { eval q{ use re qw(debug); $&; }; }

The re pragma is not lexical :( This is a terrible performance killer, most of the time even worse than $&. And since the output goes to stderr, which is the error log under mod_perl, it can take a while to discover that it's still in effect globally.

Three very well known and widely used modules that use $& are Parse::RecDescent, Text::Balanced and XML::Twig.

Juerd # { site => 'juerd.nl', plp_site => 'plp.juerd.nl', do_not_use => 'spamtrap' }