in reply to Re: Re: Re: 2D arrays & mo' better blues
in thread 2D arrays & mo' better blues
Yes, the [@array] construct builds an array ref with a copy of the array --- But, the code in question uses the x operator to replicate a list of those references, and they will all be the same reference. Witness:
my @list = (3,2,1); my @refs = ([@list]) x @list; print "@refs\n"; __END__ which prints: ARRAY(0x80f3764) ARRAY(0x80f3764) ARRAY(0x80f3764)
Those are not references to the original array, they are all references to the same anonymous array that holds a copy of the original.
|
|---|