massa's code does not actually cause autovivification (perl 5.8.8) ...
use warnings; use strict; use Data::Dumper; my %p; my %q = ( 1 => undef ); print Dumper( 'before', \%p ); my $r = grep $p{ $_ }, keys %q; print Dumper( 'after', \%p );
... I was also suspicious of autovivification but had to test that myself.
In reply to Re^6: Common hash keys
by parv
in thread Common hash keys
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |