Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options

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?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://618268]
[holli]: the hell? i have a scriptblocker on.
[holli]: how do you update a different window without javascript?
[holli]: ah, chatterbox right
[marto]: it's a normal HTML form, with some hidden input fields
[holli]: forgot that thing exists for a moment.
LanX welcome to the twilight zone ...
[Eily]: LanX well since the onion is your eye you should see it everywhere
[marto]: sounds eye watering
[LanX]: oh your talking about my pic?

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (12)
As of 2017-12-14 16:18 GMT
Find Nodes?
    Voting Booth?
    What programming language do you hate the most?

    Results (398 votes). Check out past polls.