If it's just several times then your results may be explained by the overhead to initialize qr.
Another guess is to try $s =~ /$re/; instead of $s =~ $re; (which is admittedly counterintuitive)
Can't test, sorry.
Cheers Rolf
(addicted to the Perl Programming Language and ☆☆☆☆ :)
Wikisyntax for the Monastery
In reply to Re: Performance penalty of using qr//
by LanX
in thread Performance penalty of using qr//
by Athanasius
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |