in reply to PERL newbie question
while($line=<FH>) { $line=~s/foo/baz/g; # Replace all occurrences. #Write $line to a temp file } [download]