perl -i.bak -p -e "s/gary/harry/g;" file.txt