in reply to Search & Replace

perl -pi -e's/XYZ/ABC/g' thefile.name anotherfile.name

After Compline,
Zaxo

Replies are listed 'Best First'.
Re^2: Search & Replace
by Aristotle (Chancellor) on Sep 16, 2002 at 09:37 UTC
    And for the paranoid and the careful: perl -pi.bak -e's/XYZ/ABC/g' thefile.name anotherfile.name which will leave behind copies of the original files with .bak appended to their names.

    Makeshifts last the longest.

      for the paranoid and the careful:

      Good advice, but don't make the same mistake I made once and run that twice to fix a typo or buglet.

      In that case, of course, the "wrong" versions generated by the first run will overwrite the .bak files.
      --
      Mike

        what about adding BEGIN{$^I=time} ?