in reply to Testing Hash with empty value in HoH
A reference to a hash, even an empty hash, is true. Try defreferencing it.
my $foo = {}; print "OK\n" if (scalar %{$foo});
In Section
Seekers of Perl Wisdom
in reply to Testing Hash with empty value in HoH
A reference to a hash, even an empty hash, is true. Try defreferencing it.
my $foo = {}; print "OK\n" if (scalar %{$foo});