Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re: shifting arguments

by ozone (Friar)
on Aug 22, 2001 at 20:02 UTC ( #107008=note: print w/replies, xml ) Need Help??


in reply to shifting arguments

from the perlfunc man page:
"shift: Shifts the first value of the array off and returns it"

shift only retrieves the first value from the array... so the other two would naturally be undef.

you could do:

my($reg, $ass, $check) = (shift, shift, shift);
or try something clever with 'splice'

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (2)
As of 2022-05-22 13:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you prefer to work remotely?



    Results (80 votes). Check out past polls.

    Notices?