Why do you expect zero specifically?
The false value typically returned by Perl is a special value that's "" when treated as a string and 0 when treated as a number.
$ perl -wle'my $x = !1; print "".$x; print 0+$x;' 0 $ perl -wle'my $x = ""; print "".$x; print 0+$x;' Argument "" isn't numeric in addition (+) at -e line 1. 0 $ perl -wle'my $x = 0; print "".$x; print 0+$x;' 0 0
In reply to Re: Logical Not not working!!!
by ikegami
in thread Logical Not not working!!!
by baski
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |