in reply to Re: what's wrong with this?
in thread what's wrong with this?
Perl Idioms Explained - && and || "Short Circuit" operatorsC:\>perl -MO=Deparse,-p -e" my $foo = shift || die 666;" (my $foo = (shift(@ARGV) || die(666))); -e syntax OK C:\>perl -MO=Deparse,-p -e" my $foo = shift or die 666;" ((my $foo = shift(@ARGV)) or die(666)); -e syntax OK C:\>perl -e" my $foo = shift || die 666;" 666 at -e line 1. C:\>perl -e" my $foo = shift or die 666;" 666 at -e line 1. C:\>
|
|---|