Every time I needed to add a domain or sub domain to my servers I was having to open httpd.conf add a new vhosts directive and then restart Apache.
I was nervous ever time I was in there. Afraid that I would break a domain I wasn't actually working on or even worse Apache wouldn't restart correctly. It took some time but I have the perfect new directive.
Perl -pi -e isn't inherintly recursive but there is a simple way to work around this. Using grep in place of the file name can return the path and filename to the string you are trying to replace.
I have included a good example below.
perl -pi -e 's/searchstring/replacementstring/g' `grep -lri searchstring *`
If you need to make a static backup of a dynamic site you are going to find that you can't access the pages because apache is trying to parse the URLs' query string.
You will have something that looks like "index.php?module=". and it needs to look like "index.php%3fmodule="
perl -pi -e 's/index.php\?/index.php\%3f/g' ./*
Will change all of your links so you can access the backup.