in reply to Re^6: Evaluation Order again.
in thread Evaluation Order again.
No, it's still wrong, and for the same reason. Arguments aren't evaluated. Arguments are values, not code.
You are probably referring to the argument list expression, but it's not necessary evaluated from left-to-right either.
Here's an example that's right-to-left:
$ perl -E' sub L :lvalue { say "L"; $L } sub R { say "R"; $R } sub { }->( L() = R() ); ' R L
Here's an example that's neither:
$ perl -E' sub X1 :lvalue { say "X1"; $X1 } sub X2 { say "X2"; $X2 } sub X3 { say "X3"; $X3 } sub { }->( X1() = X2() || X3() ); ' X2 X3 X1
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^8: Evaluation Order again. (pedantry)
by tye (Sage) on Jun 02, 2016 at 06:36 UTC | |
by ikegami (Patriarch) on Jun 02, 2016 at 15:19 UTC | |
by tye (Sage) on Jun 02, 2016 at 18:01 UTC | |
by ikegami (Patriarch) on Jun 02, 2016 at 19:15 UTC | |
by tye (Sage) on Jun 02, 2016 at 23:33 UTC | |
|
Re^8: Evaluation Order again.
by Anonymous Monk on Jun 01, 2016 at 19:30 UTC | |
by ikegami (Patriarch) on Jun 02, 2016 at 01:05 UTC | |
by Anonymous Monk on Jun 02, 2016 at 02:25 UTC |