in reply to Re^2: How should I understand scalar(%hash) results?
in thread How should I understand scalar(%hash) results?

In normal programs the only interesting thing about this is that it's guaranteed to return false for an empty hash and something that's true otherwise. So you can check if a hash is empty or not by simply using the hash name in boolean context (which is a scalar context):
if (%hash) { ..do something for a filled %hash... } else { ...do something for an empty %hash... }