#! /usr/bin/perl use strict ; use warnings ; use Data::Dumper ; $|++ ; my @arr1 = qw/ jim steve jim2 terry steve / ; my @arr2 = qw/ 1 3 5 2 4 / ; my %hash = () ; for ( 0 .. $#arr1 ) { $hash{$arr1[$_]} += $arr2[$_] } print Dumper( \%hash ) ; exit ; __END__
In reply to Re: multiple arrays and lists
by DamnDirtyApe
in thread multiple arrays and lists
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |