Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

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

by CountZero (Bishop)
on Sep 14, 2012 at 20:34 UTC ( [id://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

Replies are listed 'Best First'.
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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://993791]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (4)
As of 2024-03-19 04:14 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found