in reply to references--hard vs anonymous operational weirdness
When you have \@array you create a reference to an array. Every time through the loop it is a reference to the same array. On the other hand [@array] is an anonymous array constructor that does a shallow copy of @array and creates a reference to the new copy.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: references--hard vs anonymous operational weirdness
by Fletch (Bishop) on Mar 23, 2008 at 03:23 UTC | |
by hipowls (Curate) on Mar 23, 2008 at 03:43 UTC | |
by chromatic (Archbishop) on Mar 23, 2008 at 03:55 UTC | |
by hipowls (Curate) on Mar 23, 2008 at 04:19 UTC | |
by ikegami (Patriarch) on Mar 23, 2008 at 04:41 UTC | |
|
In Section
Seekers of Perl Wisdom