in reply to regex matches with () in strings

($destdir = $srcdir) =~ s/^\Q$srcroot/$destroot/;

Check out perlre for more info on all the regular expression special characters. It's like a language all to itself in there! :-)