in reply to scalable chomping

You are going to have to open the file and process each item line by line.
$input = "oldlog"; my $output = "newlog"; open (INPUT,"<$input") || die "$!\n"; open (OUTPUT,">$output") || die "$!\n"; foreach $line (<INPUT>) { chomp($line); # remove newlines or whatever regex # do line-by-line processing. print OUTPUT $line; } close INPUT; close OUTPUT;
This will open your log file, do something to it line by line and dump the results in another logfile. The regex stuff is the hard part.