Dear Stackoverflowers,
When calling exist on a hash for testing the existence of keys much further nested in a hash that does not exist, it will create keys leading to final test to see if the final key exist.
The example from perldoc exists is such:
undef $ref;
if (exists $ref->{"Some key"}) {}
print $ref; # prints HASH(0x80d3d5c)
I absolutely love the autovification feature of perl; however, I am now absolutely frightened of using exists for any future projects I may have.
Does anyone know if and/or how one may edit the library perl uses exists from or perhaps use a module to correct for this? It is really silly that if it does not exist, it makes one to see if future keys will exist.
Lastly, learning from the question below in Checking for existence of hash key creates key, one of the comments states OO-style for deeply nested hashes are suggested. Will there be any technical issues with deeply nested (>n=10) and high memory (>8GB) with very simple floating values stored in these nested hashes? Or just issues like this one?