Two things. First, I think you want to empty an array. Do that by assigning it an empty list.
Second, your copy the values out of the reference into a new array and modifies the copy, not the original.
Improve your skills with Modern Perl: the free book.
In reply to Re: passing reference to subroutine
by chromatic
in thread passing reference to subroutine
by asthaonard
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |