|
|
| Pathologically Eclectic Rubbish Lister | |
| PerlMonks |
Re^2: Re-use of a global matchby shmem (Chancellor) |
| on Aug 01, 2007 at 10:48 UTC ( [id://630015]=note: print w/replies, xml ) | Need Help?? |
|
Do gube's original question and the fine answers above not point also to some optomization (a single instance in the symbol table of the two identical if...} clauses? No*. It all has to do with match positions not being reset until a match failed, if /g is in effect. Without /g, those internal state variables are reset before each match; with /g, they are reset after a match failed. *) which doesn't mean there isn't such optimization, merely that the behaviour gives no evidence about that. --shmem
In Section
Seekers of Perl Wisdom
|
|
||||||||||||||||||||||||||||||