It is more normal to use these arguments to return the conditional values to an assignment rather than assign values inside the arguments, i.e. this would be a more normal way:( $_ eq 's' ) ? ( $OPER = 's' ) : ( $OPER = 'c' ); # still cringeing
# </cringe> $OPER = ( $_ eq 's' ) ? 's' : 'c';
-M
Free your mind
In reply to Re: ternary operator
by Moron
in thread ternary operator
by pglenski
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |