should do it. It's because "=" has higher precedence than "?:" (see perldoc perlop). This should also work:
$_ = /yes/i ? 'Yes' : 'No';update: The ?: is called the conditional operator. It is a ternary operator because it has 3 arguments.
In reply to Re: if condition problem
by fglock
in thread if condition problem
by hotshot
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |