Fellow monks,
I have a program that is started when a user logs into the system and stays alive (hopefully) until the user exits. This program occasionally logs some events to $logfile. Recently, I received a request from my boss to make sure that this logfile does not exceed some predefined file size, which, for the sake of this discussion will be 100 lines of the log file. In other words, I need a way to do `tail -100 $logfile > $logfile.tmp; mv $logfile.tmp $logfile` from inside my script. Is there a propper perlish way to do that?