I think you didn't understand your own link, whether you read it or not. The docs for exists are quite plain about saying that an element does not autovivify. What it goes on to say is that intervening objects are autovivified. e.g.:
my %h;
if (exists $h{foo}) {...}
# %h is NOT modified.
if (exists $h{foo}{bar}) { ...}
# $h{foo} is autovivified to be a hash ref
# $h{foo}, the hash ref, is empty - $h{foo}{bar} is NOT created.
The first example is what the first paragraph of exists is talking about. The second example is what the docs are talking about later. |