Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: Regarding arrays

by borisz (Canon)
on May 23, 2007 at 08:54 UTC ( #616959=note: print w/ replies, xml ) Need Help??


in reply to Regarding arrays

use Data::Dumper; my @a1 = qw(ME K LE K HT ME LL); my @a2 = qw(10 4 1 5 6 7 19); my %h; $h{ $a1[$_] } += $a2[$_] for ( 0 .. $#a1 ); print Dumper( \%h ); __OUTPUT__ $VAR1 = { 'HT' => 6, 'ME' => 17, 'LE' => 1, 'K' => 9, 'LL' => 19 };
Boris


Comment on Re: Regarding arrays
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (7)
As of 2014-08-27 09:35 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (235 votes), past polls