undef $ref; if ("HASH" eq ref $ref && exists $ref -> {"Some key"}) { } #### $ref = []; if (exists $ref -> {key}) { }