With the "wrong" version, @a is defined outside the loop, so each time you take its address, you get the same value.
with the "right" version, @a is defined inside the loop, and so a new array is created each time you iterate the loop. Hence you get different addresses each time.
In reply to Re: Scope and references
by BrowserUk
in thread Scope and references
by {}think
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |