http://www.perlmonks.org?node_id=997777


in reply to Re: I just want to understand why ...
in thread Why does testing for the existence of hash keys create the keys ?

And then there's the third way which requires some extra typing, but is fine for two-level or three-level hashes:

my $r = $hashref; # better to use a short variable name here if($r->{a} and $r->{a}->{b} and exists $r->{a}->{b}->{c}) { # Do something }