Updated to address GrandFather's concern below.
my @pe_total = ( { 'COMP_TOTAL' => '2445.00' }, { 'COMP_TOTAL' => '728.00' } );; my $total; $total += $_->{COMP_TOTAL} for @pe_total; print $total;; 3173
In reply to Re: Sum of values in an array
by BrowserUk
in thread Sum of values in an array
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |