Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re: Why does perl expression in empty nested hash create parents

by bellaire (Hermit)
on Feb 21, 2011 at 19:21 UTC ( #889473=note: print w/replies, xml ) Need Help??


in reply to Why does perl expression in empty nested hash create parents

This was previously discussed here. This is known as autovivification, and is documented in the documentation for exists, and in perlref. Yes, the only way to avoid this behavior of exists is to check the higher levels of the hash first.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://889473]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (10)
As of 2019-10-18 13:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Notices?