my $dir = "."; opendir(DIR, $dir) or die "$dir: $!"; my @list = grep { -d "$dir/$_" and ! /^\./ } readdir(DIR); closedir(DIR);