Doesn't the code in Re: Splitting file path do that?
Well, it sounds like you want just the file name of of the directories, not the whole path. I don't see how this could be useful, but if that's what you want, use File::Basename's basename:
use File::Find::Rule qw( );
use File::Basename qw( basename );
my @subdirs =
map basename($_),
File::Find::Rule->directory->in($hardPath);
|