Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: Sum Fields in Array

by linuxer (Deacon)
on Feb 02, 2010 at 21:50 UTC ( #821044=note: print w/ replies, xml ) Need Help??


in reply to Sum Fields in Array

I admit, I have to reactivate my SQL knowledge .... Maybe List::Util can help you:

use List::Util qw( sum ); my $sum_debit = sum map { $_->{fooddebits} } @fields;


Comment on Re: Sum Fields in Array
Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://821044]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (6)
As of 2015-07-30 01:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (269 votes), past polls