Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: How to get Keys from hash having same value?

by merlyn (Sage)
on Jan 07, 2008 at 06:06 UTC ( #660762=note: print w/replies, xml ) Need Help??


in reply to How to get Keys from hash having same value?

Oops:
%myhash = { 1 => 'a', 2=> 'b', 3=> 'a', 4=>'c'}
isn't gonna work. You're creating a hashref (resulting in a single scalar) on the right, but assigning it to a hash (wanting a list) on the left. You should be consistent.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (6)
As of 2020-10-29 10:54 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My favourite web site is:












    Results (270 votes). Check out past polls.

    Notices?