Beefy Boxes and Bandwidth Generously Provided by pair Networks Cowboy Neal with Hat
Perl: the Markov chain saw
 
PerlMonks  

Re^3: Counting how many times item is occurring and adding the total from array help!

by CountZero (Chancellor)
on Sep 14, 2012 at 20:34 UTC ( #993791=note: print w/ replies, xml ) Need Help??


in reply to Re^2: Counting how many times item is occurring and adding the total from array help!
in thread Counting how many times item is occurring and adding the total from array help!

Easy! replace the last two lines by:

say "Account $_ - occurring $accounts{$_}->[1] time(s) - Total = $acco +unts{$_}->[0]" for keys %accounts; say "Grand Total = $g_total";

CountZero

A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James

My blog: Imperial Deltronics


Comment on Re^3: Counting how many times item is occurring and adding the total from array help!
Download Code
Re^4: Counting how many times item is occurring and adding the total from array help!
by Anonymous Monk on Sep 15, 2012 at 12:07 UTC
    Great help, thanks a lot!!!! On my way to code some more now!!!

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (5)
As of 2014-04-21 03:22 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (490 votes), past polls