"perl -pi -w -e 's/search/replace/g;' *.txt"
'search' is a regular expression. This means you have to escape most special characters with a backslash (\) and you can add lots of advanced stuff like pattern matching, look-ahead, look-behind etc.
-p loop through parameters (in this case, all files matching*.txt)
-i edit in-place
-w enable warnings
-e execute the quoted script
Google 'regular expressions' or 'perlretut' to learn more about how to do really cool stuff with regular expressions.