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

Re: Compare two hash values for a match

by LanX (Bishop)
on Oct 13, 2013 at 09:26 UTC ( #1058049=note: print w/replies, xml ) Need Help??


in reply to Compare two hash values for a match

in your top scope '$name' is never set, i.e. it's undef in all your attempts as hash key.

Cheers Rolf

( addicted to the Perl Programming Language)

Replies are listed 'Best First'.
Re^2: Compare two hash values for a match
by vlad3848 (Acolyte) on Oct 25, 2013 at 07:01 UTC
    Thank you! That made a lot of sense! Since it was not getting defined i couldn't compare my keys to undefined value. I changed it to
    foreach $key(@key2) { $sysdef = $current{$key}{"nodesysoid"}; if (exists $lookup{$sysdef}){ #print "$key, $sysdef, $lookup{$sysdef}{name}, $source\n"; } }

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (4)
As of 2018-08-16 07:50 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Asked to put a square peg in a round hole, I would:









    Results (167 votes). Check out past polls.

    Notices?