in reply to generating hashes of hashes

Use the ref function to determine if a scalar contains a reference to a hash.