Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: Heisenberg Uncertainty Hash

by Zaxo (Archbishop)
on Apr 26, 2005 at 22:50 UTC ( [id://451793]=note: print w/replies, xml ) Need Help??


in reply to Heisenberg Uncertainty Hash

The higher-level 'd' key is autovivified by checking for a lower-level key. Check existance of the higher-level key before doing anything with the lower level.

if (exists $hash{'d'} and !$hash{'d'}->{'value'}) { print "That key doesn't exist. Valid keys are: "; print join (", ", keys %hash); }

This is a well-known gotcha.

After Compline,
Zaxo

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others having a coffee break in the Monastery: (4)
As of 2024-06-20 05:31 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?
    erzuuli‥ 🛈The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.