Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re: eval order of args to a sub

by Trizor (Pilgrim)
on May 30, 2007 at 18:55 UTC ( #618268=note: print w/replies, xml ) Need Help??


in reply to eval order of args to a sub

Arguments are passed to subs as a list. if you have foo($arg1,@moargs) it will recieve @_ = ($arg1,@moargs). In list context list elements are placed in the list in order. However prototypes can change the way the arguments are evaluated. foo (\@\%) causes perl to treat foo(@argar,%arghs) as foo(\@argar,\%arghs).

This is all explained in perlsub which draws on information in perlfunc and perlop.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (5)
As of 2018-08-14 15:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Asked to put a square peg in a round hole, I would:









    Results (152 votes). Check out past polls.

    Notices?