See perlsyn on Foreach-Loops. The looop variable gets localized, that is, at loop end its value gets restored to what it was before the loop started.
In reply to Re: Why the variable $n was undef?
by Corion
in thread Why the variable $n was undef?
by appleii
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |