I think it is better to translate that totranslates to
$dec eq "to be" ? print "Romeo is" : print "Romeo is not";
print $dec eq 'to be' ? 'Romeo is' : 'Romeo is not';
or even
print 'Romeo is', $dec eq 'to be' ? '' : ' not';
There is less repetition and less chance of running into precedence problems this way. Note that I use single quotes as there is no interpolation happening.
Cheers,
JohnGG
In reply to Re: defined ? to be : not
by johngg
in thread defined ? to be : not
by Don Coyote
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |