Quickly substitute patterns in a text file with Perl:

$ echo "Hallo, Welt." > substitute
$ perl -pi -e 's/Ha/He/g;s/elt/orld/g' substitute
$ cat substitute
Hello, World.

I used it to convert some text files from dos to unix newline:

perl -pi -e 's/\r\n/\n/g' 

Tends to be very useful when scripting. If needed, you can batch substitute in combination with find:

find . -type f -exec perl -pi -e 's/A/B/g' {} \;