# Find all sub-dirs of $dir opendir DIR, $dir or die "yaddah:$!"; @subdirs = grep { -d } readdir(DIR);