in reply to How to modify a file

See the runtime flags p and perhaps i in perlrun
Bill