in reply to how to substitute a word in a file by perl
See
get n lines before or after a pattern,
Re: modifying a file with regex!,
perlintro,
open,
readline,
rename,
Re^5: Remove a Line,
perlintro,
open,
close,
readline,
rename,
Re: Rewriting into file,
Re^2: Write to existing file with character insert