in reply to cleaning up logs

You aske for pointers, here you are:

You'll need open,close,flock,time,Time::Local,rename and probably File::Copy for that. HTH

--
http://fruiture.de