opendir (DIR, "/some/path"); my @array = grep !/^\.\.\z/, readdir(DIR); closedir (DIR);