in reply to simple text substitution.
As an example: to change all occurances of foo in bar in a file:
perl -pi -e 's/foo/bar/g' file
See perlrun for more on perl command switches.
HTH, Paul