print "foo" if $h{g} && $h{g}{h} && defined $h{g}{h}{i};