Perl Monk, Perl Meditation | |
PerlMonks |
Re: eval order of args to a subby Trizor (Pilgrim) |
on May 30, 2007 at 18:55 UTC ( [id://618268]=note: print w/replies, xml ) | Need Help?? |
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.
In Section
Seekers of Perl Wisdom
|
|