Clear questions and runnable code get the best and fastest answer |
|
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
A subroutine gets it's arguments as an array (@_), so if you do Within some_sub, @_ will equal the contents of @array. However, you probably want to pass the array into the subroutine by reference (see perlref for more): In that case, the first element of @_, the argument list to some_sub, will be a reference to @array. If the information in this post is inaccurate, or just plain wrong, don't just downvote - please post explaining what's wrong. In reply to Re: passing arrays to subroutines
by BazB
|
|