$ perl -e' my %h; 1 for $h{k}; CORE::say 0+keys(%h); ' 1 $ perl -e' no autovivification; my %h; 1 for $h{k}; CORE::say 0+keys(%h); ' 1