my @dirs = grep { -d "$dir/$_" } read_dir($dir, keep_dot_dot=>1);