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

Re: Collecting all values with shift

by dws (Chancellor)
on Aug 30, 2002 at 04:13 UTC ( [id://193995]=note: print w/replies, xml ) Need Help??


in reply to [untitled node, ID 193991]

What is the best and smartest way to get all values passed to a subroutine, when the number of incoming values is not known? while (shift) ?

@_ holds all of the values passed.

my @copy = @_; # gets you a copy, if that's what you need

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others studying the Monastery: (2)
As of 2024-04-18 23:36 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found