|
|
|
Clear questions and runnable code get the best and fastest answer |
|
| PerlMonks |
Re: Close a file and reopen a new one at midnightby aitap (Chaplain) |
| on Jan 14, 2013 at 18:44 UTC ( #1013258=note: print w/ replies, xml ) | Need Help?? |
|
It looks like you are running a UNIX-like system. You may want to install a signal handler to reopen the filehandle and either alarm at midnight (and catch the ALRM signal) or send some signal (USR1, for example) via cron daemon and handle it. You can even automatically compress and/or remove old files using logrotate if you want.
Sorry if my advice was wrong.
In Section
Seekers of Perl Wisdom
|
|
||||||||||||||||||||||