Scourgify, a perl script for massive search and replace work on a file. You can define a set of search and replace rules in a configuration file, then use those rules on any text file used as an input. Additionally, you can add a header and a footer to the input file, constraint the output to be cut in lines of less than n characters (without breaking words), and add prefixes and suffixes to lines. This tool is great for processing logs.