no autovivification qw(exists); if (!exists $rec{NOTE}{Nested}) { # but this still autovivifies $rec{NOTE}={}; $rec{NOTE}{Nested2} = 'Foo'; }