Thanks! I think this is the answer I was looking for. Keys() is supplying some extra magic to cause autovivification whereas plain scalar context unfortunately doesn't. Oh well. Unfortunately, I bet on if (%{$h{x}}) autovivifying because I knew if (keys %{$h{x}}) did.