Keep It Simple, Stupid | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
From perlsub:
"...all functions are passed as parameters one single flat list of scalars, and all functions likewise return to their caller one single flat list of scalars."In other words, all subs have only one argument, a list value. Since the constructor for list values is the comma-separated list of values, the question becomes 'in what order are the arguments to the list-context comma operator evaluated?' Frustratingly, the documentation doesn't seem to say... My guess is that it's right to left in most implementations (due to the overloading of comma in scalar context) but that may not be dependable. Later: It is in fact defined as left to right! Thanks, ikegami. Later later: ummm, if this is crucial, please see discussion below. There is some disagreement. ~dewey In reply to Re: eval order of args to a sub
by dewey
|
|