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