in reply to Consolidate info in a while() loop
Make a hash where the names of the weekdays are the keys and the numbers are the values.
Then do something like $total{$weekday} += $number;
Do this at the spot where you previously printed the numbers and print after the while-loop has run its course.
CountZero
"If you have four groups working on a compiler, you'll get a 4-pass compiler." - Conway's Law
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Consolidate info in a while() loop
by peppiv (Curate) on Jan 21, 2003 at 21:41 UTC | |
by poj (Abbot) on Jan 21, 2003 at 22:43 UTC | |
by peppiv (Curate) on Jan 22, 2003 at 13:38 UTC | |
by CountZero (Bishop) on Jan 21, 2003 at 22:17 UTC |