in reply to Re: String substitutionin thread String substitution
perl -pi -e 's/apple/orange/gi' [download]
Caveat: i without an extention does not work in Windows.