in reply to
Limiting log file size
I'd look at using
logrotate
which may already be installed on your system.
It's used by many (most?) Linux distributions to rotate the system logs and is very flexible.
Comment on
Re: Limiting log file size
In Section
Seekers of Perl Wisdom