Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
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

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://616959]
help
Chatterbox?
[Discipulus]: the photo was removed... Cyrano de Berjerac was not of the same idea..
[stevieb]: perldigious: video near our hq in Montreal. Here in Calgary, it's -28c... we've only got 3" of snow so far, but there are several feet in the mountains already
[perldigious]: Snowshoeing time stevieb? I need to buy a pair so I can walk my German Shepherd properly through the country.
[stevieb]: yeah, I snowshoe a fair amount in the mountains. I also use spikes similar to these very often as well
[perldigious]: Discipulus: alternate link
[stevieb]: LOL you can easily replace "Helsinki" with "Alberta"

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (11)
As of 2016-12-06 16:30 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    On a regular basis, I'm most likely to spy upon:













    Results (112 votes). Check out past polls.