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