in reply to How to have a subroutine return an undefined hash

Using numeric equality is not how you check defined-ness. Try defined. See Fletch's note below.

Also note that getHash should return () rather than undef to give you an undefined hash. Returning undef will give you a malformed-but-defined hash.


Caution: Contents may have been coded under pressure.