Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: Initializing a hash table

by thelenm (Vicar)
on Jan 19, 2004 at 21:53 UTC ( #322447=note: print w/replies, xml ) Need Help??


in reply to Initializing a hash table

Could you post a snippet of code that shows what you're currently doing? I would think that at the time when you print out the results, you could just print "0" if you detect that no entries exist. Depending on how you're building the hash, "detecting no entries" could mean using exists, or defined, or scalar keys %{$hash{'key'}}, or something else.

-- Mike

--
XML::Simpler does not require XML::Parser or a SAX parser. It does require File::Slurp.
-- grantm, perldoc XML::Simpler

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://322447]
help
Chatterbox?
[Discipulus]: erix resize your elephant
[erix]: but elephant /are/ big
[Discipulus]: Lady_Aleena micro management of code, micro optimization is a pain, you'll brake working things
[Discipulus]: erix you are right but buy a bigger monitor for me then

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (7)
As of 2017-05-27 20:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?