Hmm. I'm not convinced. By using %{$h{x}}, I'm not saying anything different: i.e. I expect $h{x} to hold a hash, and I want it autovivified if $h{x} is undef. By using keys(%{$h{x}}), I'm saying: give me the list (or count) of keys in the hash in $h{x} and autovivify it if it's not there (returning an empty list or 0 from keys).