in reply to Regarding arrays

Building on borisz's solution, except the output is ordered according to the first array. Each entry is written once only.
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 ); for (@a1) { next if (!exists($h{$_})); print $_ ."=". delete($h{$_}); } __END__ ME=17 K=9 LE=1 HT=6 LL=19
BTW: Is this homework?

Andreas
--