in reply to Editing Contents of a File

or do all in one shot:
perl -pe 's/hello/goodbye/g' <infile >outfile
Boris