Extrating String using Split

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Hi All
I have following code,

my $Loc="C:\Temp\testing_disp\Internal";

where A,B,C are deeper directory tree what I need, is to split so that
I get directory tree A,

The problem if I use below code it complains
my @finaldir=map((split(/$Loc/))[1],@alldir);
Unrecognized escape \T passed through before HERE mark in regex m/C:\T
<< HERE emp\testing_disp\Internal/

fails with the same error
even if I remove reference to "c:" I still cannot split

Question is how to extract rest of tree;


Site Timeline