Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: usage of if on nested hash creating empty slot for non existing value

by bart (Canon)
on Jan 29, 2011 at 16:46 UTC ( [id://885032]=note: print w/replies, xml ) Need Help??


in reply to usage of if on nested hash creating empty slot for non existing value

if (defined $hash->{A}->{LEVEL2}->{LEVEL2_2}) {
To prevent autovivification, make this
if (exists $hash->{A} && exists $hash->{A}->{LEVEL2} && defined $hash- +>{A}->{LEVEL2}->{LEVEL2_2}) {

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (5)
As of 2025-11-11 08:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What's your view on AI coding assistants?





    Results (67 votes). Check out past polls.

    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.