Perl-Sensitive Sunglasses | |
PerlMonks |
Re^5: Conditional Operator Confusionby ikegami (Patriarch) |
on Nov 30, 2006 at 17:12 UTC ( [id://587014]=note: print w/replies, xml ) | Need Help?? |
The conditional operator has higher precedence than the assignment operator, so
The addition operator has higher precedence than the conditional operator, so
If you want to do assignments, use if or add parens. Think of as the conditional operator as an operator that returns something.
In Section
Seekers of Perl Wisdom
|
|