Your problem here is that you're taking a reference to the array and then dereferencing it in the subroutine getting back the original array.
Instead of
my $myarrayref = \@myarray;
try doing
my $myarrayref = [@myarray];
Take a look at perlref for a discussion of how this works; if that seems a little advanced for you, try the tutorial: perlreftut.
-- Ken
In reply to Re: using arrays of arrays
by kcott
in thread using arrays of arrays
by Perl_Wannabe
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |