in reply to Use a Serialized Hash... When It Might Not Exist?
In fact, why not replace
if(DoIHaveThisData($hashref, 'key2')){ [download]
with
if (exists $hashref->{key2}) { [download]