A reference to a hash, even an empty hash, is true. Try defreferencing it.
my $foo = {}; print "OK\n" if (scalar %{$foo});
In reply to Re: Testing Hash with empty value in HoH
by dorward
in thread Testing Hash with empty value in HoH
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |