In your second code snippet, you can get the array back with either of:
Passing a ref to the array, as in your second snippet, is the way to go if you need to pass in several arrays and keep them distinct in the subroutine.my @list = @{ $_[0] }; my @list = @{shift()};
In reply to Re: parameters
by chipmunk
in thread parameters
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |