Your $bla is not an ordinary variable in the foreach loop. foreach my $bla (@arry) {} makes $bla an alias to each element of @arry in turn. The increment acts on the original array elements.
After Compline,
Zaxo
In reply to Re: Variable scoping, foreach loop, alias
by Zaxo
in thread Variable scoping, foreach loop, alias
by Vaati
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |