Thanks haukex, I got there eventually, I just had to tweak the code so it would run to see that behavior and understand what ravi45722 was trying to point out. I would have been confused too if I had tried that and not dug through the foreach documentation, I always use my and explicitly update variables at a higher scope with assignments inside the loop body, so I've never seen this behavior before.
In reply to Re^3: Variable in a foreach loop
by perldigious
in thread Variable in a foreach loop
by ravi45722
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |