in reply to Re: eval order of args to a sub
in thread eval order of args to a sub
The order of evaluation of the comma operator is defined as right-to-left. update2: or maybe not. see discussion below
see Terms and List Operators (Leftward)
update: I just tested this, and then I remembered that function arguments are aliases. Which throws the whole thing off.
perl -e'$i=1;sub a{print "@_"}; a($i--,++$i)'
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: eval order of args to a sub
by TGI (Parson) on May 30, 2007 at 20:48 UTC | |
by Joost (Canon) on May 30, 2007 at 21:15 UTC | |
by TGI (Parson) on May 31, 2007 at 00:29 UTC | |
|
Re^3: eval order of args to a sub
by dewey (Pilgrim) on May 30, 2007 at 19:30 UTC | |
by Joost (Canon) on May 30, 2007 at 19:42 UTC | |
by ikegami (Patriarch) on May 30, 2007 at 20:28 UTC | |
by mrpeabody (Friar) on Jun 03, 2007 at 11:15 UTC | |
by ikegami (Patriarch) on Jun 03, 2007 at 15:00 UTC | |
| |
by blazar (Canon) on May 30, 2007 at 21:34 UTC | |
by dewey (Pilgrim) on May 30, 2007 at 20:00 UTC |