Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: Sum Fields in Array

by linuxer (Curate)
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;

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://821044]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (6)
As of 2017-08-18 09:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Who is your favorite scientist and why?



























    Results (298 votes). Check out past polls.

    Notices?