$ perl -e '%x=(1 => 2); if(@x{1, 2}) { print "yes\n" } else { print "n +o\n" }' no
Why should these two statements not both print "yes", since both produce a nonempty list?$ perl -e '%x=(1 => 2); if(@{[@x{1, 2}]}) { print "yes\n" } else { pri +nt "no\n" }' yes
In reply to nonempty false list by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |