in reply to Can you teach a new dog an old trick?

perl -pi.bak -e "s/string1/string2/g" *

run this and it will open all files in the current directory with the inplace file edit -i and files are backed up to .bak extensions, the -p assumes that there is a while loop over the file so all you need to do is run the substitution within a -e switch and you're done with it.

Update: I stole from jeffa's post that you should have *.htm instead of * so it won't eat all the files


He who asks will be a fool for five minutes, but he who doesn't ask will remain a fool for life.

Chady | http://chady.net/