in reply to Re: Why does exists cause autovivication?
in thread Why does exists cause autovivication?

I think what I want is: Don't autovivify unless I'm actually performing an assignment or explicitly casting to a hash/array:
$x[2]{z} = 1; # autovivify $x[2] as a hash $x[2]{z}; # don't autovivify $x[2] %{$x[2]}; # autovivify $x[2] as a hash func($x[2]{z}); # don't autovivify $x[2]