Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: hashes with multiple values per key

by edan (Curate)
on Jan 24, 2005 at 13:35 UTC ( #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


Comment on Re: hashes with multiple values per key
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (3)
As of 2015-07-06 04:27 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (70 votes), past polls