in reply to Last undefines a for loop's itererator?
Why isn't $picture set after the loop terminates?Because at loop exit, $picture is restored to whatever value it had before loop entry (in this case undef); or more precisely: within the loop, $picture is aliased to each value in turn; outsise the loop it is not aliased and so the name $picture once again refers to the original value.
Dave.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Last undefines a for loop's itererator?
by Animator (Hermit) on Nov 12, 2005 at 11:20 UTC | |
Re^2: Last undefines a for loop's itererator?
by pg (Canon) on Nov 13, 2005 at 02:39 UTC | |
by Errto (Vicar) on Nov 13, 2005 at 07:22 UTC | |
by SolidState (Scribe) on Nov 13, 2005 at 12:59 UTC | |
by Aristotle (Chancellor) on Nov 13, 2005 at 22:11 UTC |