Because this operator produces an assignable result, using assignments without parentheses will get you in trouble. For example, this:
$a % 2 ? $a += 10 : $a += 2Really means this:
(($a % 2) ? ($a += 10) : $a) += 2
I should have noticed it.
In reply to Re^5: Date Handling in Perl
by aitap
in thread Date Handling in Perl
by joeymac
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |