# sample related values my %val = ('14:00:00' => '200', '15:00:00' => '100', '16:00:00' => '300'); my @time = ('15:00:00','14:00:00','15:00:00','16:00:00'); my %hash; for (@time) { $hash{$_} += $val{$_}; }
Or am I misunderstanding the question?
cLive ;-)
In reply to Re: Tricky hash value
by cLive ;-)
in thread Tricky hash value
by HeffaK
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |