Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: Test Presence of Data in Hash

by davorg (Chancellor)
on Jul 20, 2009 at 20:41 UTC ( #781760=note: print w/ replies, xml ) Need Help??


in reply to Test Presence of Data in Hash

This doesn't address the interesting questions you've raised about hashes. I'm sure that others will have good explanations of that, but I just wanted to point out that the best way to check if a hash contains any data is to use the keys function. In scalar context keys will return the number of keys defined in the hash.

--

See the Copyright notice on my home node.

Perl training courses


Comment on Re: Test Presence of Data in Hash

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (9)
As of 2014-08-28 08:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (259 votes), past polls