in reply to Persistent logging...

Since you seem to be just taking data and pushing it off to disk, you might want to consider Sys::Syslog and use a syslog or syslog-ng daemon.

Frank Wiles <frank@revsys.com>
www.revsys.com

Replies are listed 'Best First'.
Re^2: Persistent logging...
by superfrink (Curate) on Mar 12, 2007 at 04:30 UTC
    A related program is www.cronolog.org . You might be able to use a command line like this one instead of writing any code:
    cat /dev/ttyS0 | cronolog /logs/serial_data_%Y-%m-%d
    The above line will automatically create one log file per day and date-stamp it with the format YYYY-MM-DD .