c:\@Work\Perl\monks>perl -wMstrict -MData::Dump -le
"my %hash;
print 'yes' if exists $hash{'www'}{'xxx'}{'yyy'}{'zzz'};
dd \%hash;
"
{ www => { xxx => { yyy => {} } } }
####
c:\@Work\Perl\monks>perl -wMstrict -MData::Dump -le
"no autovivification;
;;
my %hash;
print 'yes' if exists $hash{'www'}{'xxx'}{'yyy'}{'zzz'};
dd \%hash;
"
{}
##
##
c:\@Work\Perl\monks>perl -wMstrict -MData::Dump -le
"my %h;
;;
$h{'www'}{'xxx'}{'yyy'}{'zzz'};
dd 'access in void context', \%h;
%h = ();
dd 'assigning empty list really does clear hash', \%h;
;;
my $x = $h{'www'}{'xxx'}{'yyy'}{'zzz'};
dd 'access in assignment (rvalue) context', \%h;
%h = ();
;;
1 if $h{'www'}{'xxx'}{'yyy'}{'zzz'};
dd 'access in boolean context', \%h;
%h = ();
;;
1 for $h{'www'}{'xxx'}{'yyy'}{'zzz'};
dd 'access in aliased (lvalue) context', \%h;
"
Useless use of hash element in void context at -e line 1.
("access in void context", { www => { xxx => { yyy => {} } } })
("assigning empty list really does clear hash", {})
(
"access in assignment (rvalue) context",
{ www => { xxx => { yyy => {} } } },
)
(
"access in boolean context",
{ www => { xxx => { yyy => {} } } },
)
(
"access in aliased (lvalue) context",
{ www => { xxx => { yyy => { zzz => undef } } } },
)