in reply to Re^4: Evaluation Order again.
in thread Evaluation Order again.
"Subroutine arguments are evaluated from left to right" makes no sense. Subroutines arguments aren't evaluated. Subroutine arguments are the pieces of data you get after you execute the expression that follows the call.
You appear to be imagining parallels to C where none are warranted. The documentation makes no mention that the argument list is a series of comma-separated expressions. It says:
To call subroutines:
NAME(LIST); # & is optional with parentheses. NAME LIST; # Parentheses optional if predeclared/imported. &NAME(LIST); # Circumvent prototypes. &NAME; # Makes current @_ visible to called subroutine.
LIST isn't documented, but it's consistently used to refer to expression evaluated in list context, and the examples that follow illustrates this.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^6: Evaluation Order again.
by oiskuu (Hermit) on Jun 01, 2016 at 17:48 UTC | |
by ikegami (Patriarch) on Jun 01, 2016 at 18:25 UTC | |
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 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 |