Hmmm...
I actually had to run that to work it out!
It prints "one, two, three, three, three" because the 'three' routine resets the global $_ every time the flow of execution reaches it I think? But... why doesn't the same happen with the 'two ()' routine... Something to do with the parentheses - does that sub not effect the global $_?
That's quite a mind-twister!!!
In reply to Re^2: perldelta unclear on 'given's fate
by morelenmir
in thread perldelta unclear on 'given's fate
by morelenmir
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |