Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: @_ & @ARGV

by moritz (Cardinal)
on Oct 07, 2012 at 14:48 UTC ( #997681=note: print w/ replies, xml ) Need Help??


in reply to @_ & @ARGV

@_ contains the arguments to the current (inner-most) subroutine, which is why the @_ in the inner subroutine is different from that of the outer subroutine. shift acts on @_ by default, which is why it gets the first argument to the inner-most function.

Strictly speaking,

my @list = @_; print @_, ' out return', "\n";

is the only content directly in sub formatlist, the rest is in an inner functio which has its own @_.


Comment on Re: @_ & @ARGV
Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://997681]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (8)
As of 2015-07-29 05:26 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (260 votes), past polls