You aske for pointers, here you are:
- replace the logfile with a new, empty one before processing to avoid collisions with programs that write to the file.
- open 2 other files to write the new stuff and the old stuff into.
- use a regular expression for your date (if it's reliably fixed) and the Time::Local to convert it to seconds and to compare it with time(). Based on that difference you can decide whether something is new or old and then put the stuff where it belongs.
- Delete the file you were working on.
- block the active logfile for a short moment and put its contents under the "active stuff" in the "active stuff" file and again replace the active logfile with the "active stuff" file.
You'll need open,close,flock,time,Time::Local,rename and probably File::Copy for that. HTH
--
http://
fruiture.de