Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: Compare two hash values for a match

by Laurent_R (Abbot)
on Oct 13, 2013 at 09:15 UTC ( #1058048=note: print w/replies, xml ) Need Help??


in reply to Compare two hash values for a match

Difficult to say because I can't test your program (not having the DB), but probably $name is not defined when you dump $lookup{$name}{"sysoid"}, you should test it before dumping it. Similarly, these tests:

if($current{$key}{"nodesysoid"} eq "" || $lookup{$name}{"sysoid"} eq " +"){ if($current{$key}{"nodesysoid"} eq ""){ # ...

should probably be protected against non existing and/or undefined values (unless you can be sure that this is never going to happen).

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1058048]
help
Chatterbox?
[choroba]: Moose setter
[Discipulus]: ;=)
[erix]: that's not a setter but a pointer
[Discipulus]: Perl internals
[erix]: (but what's in a name?)
Discipulus aka NodeReaper studying perlguts..
[shmem]: ah book talk ;)

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (8)
As of 2017-05-24 07:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?