Probably not. The perl compiler should be able to see that the entire regexp is completely, 100% static, and no variables in it whatsoever. Thus, it should compile the regexp once (ideally on first call, but I suspect it's done during compilation) regardless. All you're doing is copying that compiled regexp around a bit. Should have practically no effect.
In reply to Re^2: perl performance vs egrep
by Tanktalus
in thread perl performance vs egrep
by dba
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |