Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

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


Comment on Re: hash confusion
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (6)
As of 2014-12-28 13:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (181 votes), past polls