perl -pi -e '\s/old/new/' filemask .. so:
perl -pi -e '\s/<\/html>/<a href=http:\/\/www.yahoo.com\/search/' *
That only does the current directory, but you can do */*, then */*/* etc. You'll notice I put \'s in front of the /'s, thats because those are special characters, and you need to "escape" them by putting those there. You should put \'s in front of " characters as well if you use them in the href. I suggest creating a test file and testing it on that until you get it right

.