You also have to give an extension to the command to get a backup. For
this one it would basically be:
perl -pi.old -e 's/foo/bar/' *.html... in addition to the no recursion
thing....
if you dont, the target changes are applied to the source files.
t