in reply to Check for existance & definedness for Hash and Array references
When dealing with references, it's often possible for the reference to be undefined. If that's possible here, you want to make sure you got a hash ref, and that the reference hash has some elements.
if ($hash_ref && %$hash_ref)
On the other hand, if you know getHashRef never returns undef, then you don't need to check that.
if (%$hash_ref)
|
|---|