Help for this page
print "is directory" if -d "/foo/bar";
opendir DH, "/foo/bar" or die $!; my @subdirs = grep -d, readdir DH; closedir DH or die $!;