$x = "The large one costs \$3.50, the small one \$2.50.\n"; $x=~s/\$/tmp/g; print $x;