Think about Loose Coupling | |
PerlMonks |
Re: difficulty in understanding use of @_ and shift in a subroutineby johngg (Canon) |
on Oct 27, 2014 at 10:24 UTC ( [id://1105115]=note: print w/replies, xml ) | Need Help?? |
Note that while shift operates on @_ by default in a subroutine, in the main body of a script it operates on @ARGV, i.e. arguments supplied on the command line. This one-liner illustrates that.
I hope this is of interest. Cheers, JohnGG
In Section
Seekers of Perl Wisdom
|
|