in reply to Re: Re: How can I add the values of a hash?
in thread How can I add the values of a hash?

It looks to me like you want to keep a running total. If so, do something like this
my $total=0; # running total foreach (@temp) { my ($instan, $value) = (split /\*/, $_); my $k = $key . ":" . $instan; $total += $value; # total for each iteration $DM_D{$k} = $total; }
poj