in reply to Re^3: John Guttag's book - 2nd exercise. My attempt in Perl.
in thread John Guttag's book - 2nd exercise. My attempt in Perl.

What kind of troll do u think u r?
$a = 1; $b = 0; print "OR\n" if $a or $b; print "AND\n" if $a and $b; if ($a) { if ($b) { print "AND\n"; } else { print "OR\n"; } } elsif ($b) { if ($a) { print "AND\n"; } else { print "OR\n"; } }