opendir(DH, $); my @basedirs = readdir(DH); closedir(DH);