http://qs1969.pair.com?node_id=261509


in reply to Changing file contents

This one liner

perl -i.bak -pe 's/123456/234165/' filename

will change only one occurrence of the pattern, modify your file in place and save the old one with a ".bak" extension.

To change every occurrence of the pattern, use

s/123456/234165/g