Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re: getting hash key with value

by Fletch (Bishop)
on Apr 16, 2008 at 00:17 UTC ( [id://680693]=note: print w/replies, xml ) Need Help??


in reply to getting hash key with value

Given the constraint that the values are distinct, just make a reverse mapping and use that. my %vals_to_keys; @vals_to_keys{ values %src } = keys %src;

The cake is a lie.
The cake is a lie.
The cake is a lie.

Replies are listed 'Best First'.
Re^2: getting hash key with value
by sovixi (Novice) on Apr 16, 2008 at 00:25 UTC
    Thanks a lot!!!

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others about the Monastery: (5)
As of 2024-04-25 08:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found