Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
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 exploiting the Monastery: (14)
As of 2014-09-19 11:31 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (135 votes), past polls