in reply to A few questions
andmy @x = (1, 2, 3, 4); my @y = ();
instead ofpush @y, \@x;
because the later will push the elements of @x onto @y, not @x itself. the same is true for \% of cause. to get the array out of the array of arrays again:push @y, @x;
$z = pop @y; @x = @{$z}; # or @$z
|
|---|