in reply to Re: Truth and Falsehood
in thread Truth and Falsehood
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.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Truth and Falsehood
by hippo (Archbishop) on Aug 17, 2019 at 10:19 UTC | |
by haukex (Archbishop) on Aug 17, 2019 at 10:30 UTC |