Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re: @_ & @ARGV

by moritz (Cardinal)
on Oct 07, 2012 at 14:48 UTC ( [id://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 @_.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others having an uproarious good time at the Monastery: (3)
As of 2024-04-20 01:11 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found