I have two quick questions.

Question 1
I had a script create a backup of every file on my site using the following format "filename.php.bac". I want to delete these files now and I tired to use "rm *.bac" but that only deleted the files in the current directory. How can I delete ALL those files in EVERY directory and sub-directory starting at the public_html directory?

Question 2
How can I escape semi-colon's (;) in a perl script? I'm trying to run a search+replace script to update some Analytics code and I have a ton of files to update but for some reason if there is a semi-colon in the find varable, it assumes that it has reached the end of the contents in that variable.

Here is the code. Take a look at the $find variable and you will see extra semi-colon's. How do I tell the script to not treat those semi-colons as the end of the variable?


use strict; 
use warnings; 
use File::Find; 

my $startdir = '/home/site/public_html'; 

my $find = "<script src=\"http://www.google-analytics.com/urchin.js\" type=\"text/javascript\">
<script type=\"text/javascript\">
_uacct = \"UA-1234567-8\";

my $replace = "";
my $doctype = 'php';  

print qq~Finding "$find" and replacing it with "$replace"\n~; 

      return unless (/\.$doctype$/i); 
      local @ARGV = $_; 
      local $^I = '.bac'; 
      while( <> ){ 
         if( s/$find/$replace/ig ) { 
         else { 
}, $startdir);

print "Finished";