perl -pi.bak -e 's/this string/that string/g' somefile.txt