Actually, the loop variable is always aliased to the loop elements, even when you say something like for (@a1, @a2, @a3) or even for (qw(foo bar baz 1 2 3), @a1). If you really want to force flattening, you need to force a copy of the data structure: for(@{[@a1, @a2, @a3]})
Update: point taken.Makeshifts last the longest.
In reply to Re^2: Strangness with arrays
by Aristotle
in thread Strangness with arrays
by BrowserUk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |