Why wouldn't that be a syntax error?
Because ?: can be used on either the right hand side of an assignment:
my $var = $test ? $value_one : $value_two;
Or on the left hand side of an assignment:
( $test ? $var_one : $var_two ) = $value;
And because $pkg->{'DIST'} can be assigned to it is not a syntax error.
In reply to Re^3: faulty expression prob
by jwkrahn
in thread faulty expression prob
by perl-diddler
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |