Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine

Re: hash confusion

by jimbojones (Friar)
on Jul 18, 2005 at 18:22 UTC ( #475841=note: print w/replies, xml ) Need Help??

in reply to hash confusion

if ( $hash{$1} eq $2 ) { print "$1 is in hash with a value of $2\n"; }
That's if the values of the hash are strings. Possibly you'd have to use == instead of eq if they are numbers. I'm not 100% sure based on your post, but it looks like the hash key and values have ":" and "-" in them.

- j

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://475841]
[hippo]: That was around April 1994. Fun times.
[hippo]: They had purchased some shiny new 486 DXs the year before but crippled them by installing Win 3.1. I demo'd Linux with X on them to the department head and got the go-ahead to wipe Windows and install the new hotness.
[marto]: glory days ;)

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (12)
As of 2018-06-22 09:54 GMT
Find Nodes?
    Voting Booth?
    Should cpanminus be part of the standard Perl release?

    Results (124 votes). Check out past polls.