in reply to Re^2: saving nested arrays in a hash
in thread saving nested arrays in a hash
$ref1 = \@arr; $ref2 = \@arr;
The two references both point to the same underlying data structure.
$ref1 = [ @arr ]; $ref2 = [ @arr ];
The two references each point to different anonymous arrays, which have the same values as @arr, but are different structures.
As Occam said: Entia non sunt multiplicanda praeter necessitatem.
|
|---|