in reply to Can't find Unicode property definition "A"
You haven't shown us the contents of $root_dir, but my guess is that it contains regex metacharacters, like \ or *. You want to either change $root_dir in such a way that it contains forward slashes (/) in stead of backslashes, or you want to use \Q...\E (or quotemeta) when interpolating $root_dir, so that all regex metacharacters loose their meta-ness:
$_ =~ s!(\Q$root_dir\E\\)|(\Q$root_dir\E/)!!g;
Also, consider using File::Spec for your filename manipulation, and also consider anchoring your match, so that a relative path won't be stripped out of the middle of the actual directory.
|
|---|