8.6.13 Regular-expression substitution
Replace all instances of FROM_REGEX with TO_TEXT in all
of the files FILES ...:
$ perl -i -p -e 's/FROM_REGEX/TO_TEXT/g;' FILES ...
-i is for "in-place editing", -p is for
"implicit loop over FILES ...". If the substitution is
complex, you can make recovery from errors easier by using the parameter
-i.bak instead of -i; this will keep each original
file, adding .bak as a file extension.