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"; } }