in reply to scalable chomping
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.$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;
|
|---|