in reply to exists() unexpected behavior

When you access part of a multidimentional hash, even if you're only using exists(), it creates all the keys except the last one. So if you call exists $foo{'bar'}{'baz'}{'qux'}, it creates $foo{'bar'} and $foo{'bar'}{'baz'}, but not $foo{'bar'}{'baz'}{'qux'}.

If you don't want that to happen, you have to test every level, starting with the top:

if(exists $foo{'bar'} and exists $foo{'bar'}{'baz'} and exists $foo{'b +ar'}{'baz'}{'qux'}) { ... }