There are several CPAN modules that provide log rotation functionality:
However, if you have the external tool 'logrotate' installed locally, I prefer to just call that instead:
(I had logrotate
installed already on both my RHEL and Ubuntu boxes, so it's possible it's widespread)