use warnings; use strict; use List::Util qw(sum); my @pe_total = ( { 'COMP_TOTAL' => '2445.00' }, { 'COMP_TOTAL' => '728.00' } ); print sum(map { $_->{COMP_TOTAL} } @pe_total), "\n"; __END__ 3173
See also:
In reply to Re: Sum of values in an array
by toolic
in thread Sum of values in an array
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |