in reply to PERL newbie question

Any code you've written?
Roughly, it works as follows:
1. Open and read the file - TMTOWTDI - you can do it line by line.
while($line=<FH>) { $line=~s/foo/baz/g; # Replace all occurrences. #Write $line to a temp file }
2. Now rename temp file to original file.