in reply to sum function

use List::Util qw(sum); # found in the CPAN my $total = sum @hash{qw(foo bar baz)};
No need to even write a separate function... just open-code it as needed.

-- Randal L. Schwartz, Perl hacker