Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
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 studying the Monastery: (7)
As of 2014-12-26 23:44 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (176 votes), past polls