in reply to Close a file and reopen a new one at midnight
AM,
Two things after a glace at your code;
- $hrmin is a string, and you're testing as a number.
if ( $hrmin eq '1114' ) {
- '1114' is before noon, '2359' is before midnight. You also should be concerned about seconds. A lot can happen in 60 seconds.
You may want to buffer the end of the day, which may give you a more accurate end-of-day and start-of-day.
Good Luck!
"Well done is better than well said." - Benjamin Franklin
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Close a file and reopen a new one at midnight
by Anonymous Monk on Jan 14, 2013 at 19:12 UTC | |
by MidLifeXis (Monsignor) on Jan 14, 2013 at 19:18 UTC | |
Re^2: Close a file and reopen a new one at midnight
by 0day (Sexton) on Jan 14, 2013 at 18:15 UTC | |
by ww (Archbishop) on Jan 14, 2013 at 18:24 UTC | |
by MidLifeXis (Monsignor) on Jan 14, 2013 at 18:30 UTC |
In Section
Seekers of Perl Wisdom