perl -pi.bak -e "s/cheese/soup/g" *.txt #### perl -pi.bak -e "for(<*.txt>) {s/cheese/soup/g}"