Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
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 surveying the Monastery: (4)
As of 2014-09-19 22:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (151 votes), past polls