Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: Re: Re: Consolidate info in a while() loop

by CountZero (Bishop)
on Jan 21, 2003 at 22:17 UTC ( [id://228865]=note: print w/replies, xml ) Need Help??


in reply to Re: Re: Consolidate info in a while() loop
in thread Consolidate info in a while() loop

In your while-loop, obtain both the day of the week without the date (to be put into a variable $weekday) and the number (put this into $number).

Once you have these data, then $total{$weekday} += $number; will add $number to the value of the hash %total keyed by $weekday.

That's all there is to it.

CountZero

"If you have four groups working on a compiler, you'll get a 4-pass compiler." - Conway's Law

Log In?
Username:
Password:

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

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

    No recent polls found