in reply to Limiting the size of log files...

Most shops run a logrotate daemon which can rotate the files, keeping so-many recent ones on hand, compressing older ones, and so on. You simply add your files/directories to the list that this existing daemon is already processing. No Perl/programming required. Windows has a similar feature.