I've tested empty hashes on several perls here and they, like empty arrays, always appear to evaluate to zero as well. Is there a reason why you have expressed them differently here?
Just because that's what the Perl documentation says. perldata:
If you evaluate a hash in scalar context, it returns a false value if the hash is empty. If there are any key/value pairs, it returns a true value.
In reply to Re^2: Truth and Falsehood
by haukex
in thread Truth and Falsehood
by haukex
For: | Use: | ||
& | & | ||
< | < | ||
> | > | ||
[ | [ | ||
] | ] |