in reply to Modifying entries in a file.
You could use
See perldoc perlrun on how the various command-line switches for perl work.