Do you know where your variables are? | |
PerlMonks |
Re^2: An optimization of last resort: eliminate capturing from your regexpsby demerphq (Chancellor) |
on Jul 11, 2006 at 08:56 UTC ( [id://560365]=note: print w/replies, xml ) | Need Help?? |
Just so you know... $1 et all are basically ties that do something like
Part of the reason for this is that internally perl doesnt populate $1 et all with copies when it runs the regex as when backtracking it could have to recopy the contents of these vars many many times. Wheras updating the appropriate offsets is cheap and constant time.
--- $world=~s/war/peace/g
In Section
Meditations
|
|