in reply to Re: Summing column values
in thread Summing column values

(defined $hash{$array[0]}{$id}) ? ($hash{$array[0]}{$id} += $array[2]) : ($hash{$array[0]}{$id} = $array[2]);

That's more complicated than is necessary. Perl's clever enough to know that if you add a number to an undefined variable, to treat that var as 0. This would suffice:

$hash{$array[0]}{$id} += $array[2];

Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
"I'd rather go naked than blow up my ass"