![]() |
|
Syntactic Confectionery Delight | |
PerlMonks |
Re^5: Strange Regex Behaviorby quester (Vicar) |
on Dec 06, 2011 at 09:08 UTC ( [id://941975]=note: print w/replies, xml ) | Need Help?? |
Ah... yes. That would make it a bug. Sorry. It doesn't seem to be the ternary operator causing the havoc, or pattern matching though:
prints
Using Dump, we can see that the optimizer is assuming that $1 must be constant for the length of time it takes to evaluate the list:
prints
The autoincrement is also not a necessary ingredient:
prints
In Section
Seekers of Perl Wisdom
|
|