Hm. I believe the fact that the entire ternary expression is wrapped in parens means that the contents of those parens must be evaluated before anything outside them per perlop:
A TERM has the highest precedence in Perl. They include variables, quote and quote-like operators, any expression in parentheses, and any function whose arguments are parenthesized.
I also believe that as the two ternary expressions are part of a (4-term) comma separated list, those four terms should be evaluated in strictly left to right order per perlop:
"In list context, it's just the list argument separator, and inserts both its arguments into the list. These arguments are also evaluated from left to right.".
In reply to Re^4: Strange Regex Behavior
by BrowserUk
in thread Strange Regex Behavior
by Manchego
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |