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

No, they don't.

  • Comment on Re^3: John Guttag's book - 2nd exercise. My attempt in Perl.

Replies are listed 'Best First'.
Re^4: John Guttag's book - 2nd exercise. My attempt in Perl.
by Anonymous Monk on May 22, 2017 at 22:53 UTC
    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"; } }