my %hash = ('foo' => 'foo'); my $ref = \%hash; print exists $ref->{'foo'}; #Prints 1 (true) print exists $ref->{'bar'}->{'baz'}; #Prints nothing (false) print exists $ref->{'bar'}; #Prints 1 (true)