in reply to Replacing a string in a file
$ perl -pi.bak -e's/foo/bar/' file1 file2 .. [download]
Makeshifts last the longest.