Unless you have a good reason for not doing so, always use strict in your code
There are several errors in your code:
the second statement overrides the first. You should be using different (sub)hashes for each value:$hash{$chrX}{value1} += $value11 ...$hash{key2} = $value11 + $value1; $hash{key2} = $value22 + $value2;
citromatik
In reply to Re: How to add values of hash by reading from different text files
by citromatik
in thread How to add values of hash by reading from different text files
by faozhi
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |