in reply to how do $x = \12 differ from $$y = 12 ?
$x refers to @data (that is, it holds a reference to @data). But $y doesn't; rather, the array referenced in $y holds a shallow copy of the elements in @data.my @data = ('a', 'b', 'c'); my ($x, $y); $x = \@data; @$y = @data;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: how do $x = \12 differ from $$y = 12 ?
by borisz (Canon) on May 10, 2005 at 13:12 UTC | |
by japhy (Canon) on May 10, 2005 at 13:15 UTC |