in reply to Weird syntax question
if ( $x ) { print 1; } else { print 0; }
What you are really getting is:
if ( $x or print 0 ) { print 1; }
Thus when $x is false, 'print 0' is executed, and then, since the print() returns true, the if-then body is carried out.
|
---|