in reply to Weird syntax question

What you have in mind is a re-arrangement of:

   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.