Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re^2: Why does testing a key create a hash?

by friedo (Prior)
on Aug 17, 2005 at 22:39 UTC ( [id://484625]=note: print w/replies, xml ) Need Help??


in reply to Re: Why does testing a key create a hash?
in thread Why does testing a key create a hash?

Use if exists $hash->{1} instead.

Nope, that will still cause $hash to become a hashref and print 1 if $hash; will print 1. exists takes a hash element, and you can't have a hash element without a hash! :)

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others learning in the Monastery: (2)
As of 2024-04-26 03:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found