- or download this
# Filter out "." and ".."
my @array = grep !/^\.\.?\z/, readdir(DIR);
- or download this
# Filter out all "hidden" files
my @array = grep !/^\./, readdir(DIR);
- or download this
opendir (DIR, "/some/path");
my @array = grep !/^\.\.\z/, readdir(DIR);
closedir (DIR);
- or download this
opendir (my $dh, "/some/path");
my @array = grep !/^\.\.\z/, readdir($dh);
closedir ($dh);
- or download this
opendir (my $dh, "/some/path")
or die("opendir: $!\n");