You seem to be new to PerlMonks, in which case welcome. The directory in your data has leading and trailing slashes which seem to add extra empty directories at the beginning and end from splitpath. I tested under windows BTW. Anyway something like the line below should move you along in the direction you are trying to go.
print join('|', @dirs), $Name, "\n";
In reply to Re: File::Spec splitdir
by mr_ron
in thread File::Spec splitdir
by davidinottawa
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |