in reply to Re: Re: DB Ovewriting (again..)/ Counter Question
in thread DB Ovewriting (again..)/ Counter Question
I would just store it along with the current date, if storing it in a dbm, you could just do $counters{$date}++;. That way you get a dbm with dates for keys, and counts for value. To get a count for the week, just figure out which 7 days make up the week you want data for (using Date::Calc or something similar would make it easy), then add up the counters for those 7 days. To get a total count, add up all the values.
| We're not surrounded, we're in a target-rich environment! |
|---|
|
|---|