Skip to content

Instantly share code, notes, and snippets.

/a.pl

Created December 4, 2012 16:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/4205775 to your computer and use it in GitHub Desktop.
Save anonymous/4205775 to your computer and use it in GitHub Desktop.
diff between &, &&, and
use common::sense;
my ($a,$b) = (0,1);
sub a { say "\ta eh importante"; $a }
sub b { say "\tb eh importante"; $b }
say "& eh importante";
my $c = a & b;
say "&& eh importante";
my $d = a && b;
say "and eh importante";
my $e = a and b;
say "-" x 40;
say "a=>$a, b=>$b, a&b=>$c, a&&b=>$d, a and b=>$e";
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment