in reply to Weird syntax question

print always succeeds (for a suitable definition of 'always'), i.e. print 0; returns 1.

$ perl -e 'print print 0' 01$

Update: I should also say that the short-circuit behavior of or omits the print 0 clause when $x is true.

After Compline,
Zaxo

Replies are listed 'Best First'.
Re (tilly) 2: Weird syntax question
by tilly (Archbishop) on Aug 23, 2001 at 03:45 UTC
    perl -e 'print qq(Gotcha!\n) unless print STDIN qq(Hello)'
    All interactions with the system have the possibility of failure...