On Mon, Jan 7, 2013 at 5:33 PM, Neo Anderson <[email protected]> wrote: > > my @a1 = (1, 2, 3); >
Here we are actually storing the elements into the array.
> my @a2 = [1, 2, 3];
>
And in this case we are storing the reference to the array containing
elements 1, 2 and 3.
This should actually be: my $a2 = [1, 2, 3];
And to store the elements: my @a2 = @{$a2};
Thanks,
Parag
