No, it still has the '0' false negative:
$ perl -e '$x = 0; print "failed\n" unless $x and length($x)' failed $
vs.
$ perl -e '$x=0; $ print "failed\n" unless defined $x and length($x)' $
In reply to Re^2: testing defined($x) && length($x)
by kennethk
in thread testing defined($x) && length($x)
by perl5ever
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |