- or download this
my ($vol, $dirs) = File::Spec->splitpath($path, 1);
$dirs = File::Spec->canonpath($dirs);
...
pop(@dirs);
$dirs = File::Spec->catdir(@dirs);
$path = File::Spec->catpath($vol, $dirs, '');
- or download this
use strict;
use warnings;
...
print(" -> $path\n");
}
- or download this
/rootdir/sub1/sub2/sub3/sub4/
-> \rootdir\sub1\sub2\sub3
...
->
reldir
->
- or download this
my ($vol, $dirs) = File::Spec->splitpath($path, 0);
$dirs = File::Spec->canonpath($dirs);
...
pop(@dirs);
$dirs = File::Spec->catdir(@dirs);
$path = File::Spec->catpath($vol, $dirs, '');
- or download this
use strict;
use warnings;
...
print(" -> $path\n");
}
- or download this
/rootdir/sub1/sub2/sub3/sub4/
-> \rootdir\sub1\sub2\sub3
...
->
relfile
->