Perl Monk, Perl Meditation | |
PerlMonks |
Re: passing an array without a name to pop()by johngg (Canon) |
on Dec 03, 2019 at 22:44 UTC ( [id://11109633]=note: print w/replies, xml ) | Need Help?? |
Another way is to take advantage of pop's default behaviour of acting on @_ by calling an anonymous subroutine on the fly.
I hope this is of interest. Update: Note that shift can work the same way and that both by default operate on @ARGV in the main program.
Cheers, JohnGG
In Section
Seekers of Perl Wisdom
|
|