in reply to Simple Log Rotate Problem

Another approach you could take would be include the date in the filename, so instead of writing to vpnwarn.out all the time you could write to vpnwarn-11-12-2003.out (using POSIX::strftime() or something to format the filename). Then you could use a separate program to clean up these files when their number becomes too great.

It's strange that your files continue to grow if your code closely follows what you've posted here.