my $root = 'c:'; my @dirs = grep { -d } glob( "$root/*" ); print "$_\n" for @dirs;