Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask

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?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1058049]
[jdporter]: one prog I have has a UI which allows to input a bit mask
[jdporter]: currently it expects the bitmask to be in the form of a hex number, e.g. 0x0101
[jdporter]: but I'd like to let the user specify it as individual bits, i.e. 0b0000000100000001
[jdporter]: there is no bit/binary equivalent of hex, right?

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (6)
As of 2018-02-20 16:25 GMT
Find Nodes?
    Voting Booth?
    When it is dark outside I am happiest to see ...

    Results (272 votes). Check out past polls.