in reply to Sum of values in an array
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
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Sum of values in an array
by GrandFather (Saint) on Sep 25, 2014 at 21:11 UTC | |
by BrowserUk (Patriarch) on Sep 25, 2014 at 21:20 UTC |