#!/usr/bin/perl -w use strict; # starting psuedo-code while(my $line=<>){ print LOG $line; if file is too big... close LOG rename file open LOG } }