Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re^3: Check/set hash of hashes value

by kennethk (Abbot)
on Jun 25, 2013 at 15:47 UTC ( #1040615=note: print w/ replies, xml ) Need Help??


in reply to Re^2: Check/set hash of hashes value
in thread Check/set hash of hashes value

If you are testing if a value is defined, you should test that. It is possible (not knowing this person's dataset) that empty string is a legitimate value. exists, defined and eq are different for a reason.

If you use warnings, Perl will emit a warning every time you compare with an undefined value; it's a helpful tool to figure out if you've forgotten to initialize a variable. With your code and warnings, there would be a large amount of unnecessary noise on STDERR.


#11929 First ask yourself `How would I do this without a computer?' Then have the computer do it the same way.


Comment on Re^3: Check/set hash of hashes value

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (5)
As of 2015-07-05 14:01 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (67 votes), past polls