http://www.perlmonks.org?node_id=1013252


in reply to Close a file and reopen a new one at midnight

AM,

Two things after a glace at your code;

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