Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
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 studying the Monastery: (4)
As of 2024-04-19 20:51 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found