Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re: hashes with multiple values per key

by edan (Curate)
on Jan 24, 2005 at 13:35 UTC ( [id://424576]=note: print w/replies, xml ) Need Help??


in reply to hashes with multiple values per key

my %hash; for my $i ( 0 .. $#keys ) { $hash{ $keys[$i] } = [ $values1[$i], $values2[$i] ]; } for my $value ( @values3 ) { if ( exists $hash{ $value } ) { print @{ $hash{ $value } }; } }

disclaimer: UNTESTED

--
edan

Log In?
Username:
Password:

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

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

    No recent polls found