my $parent = Path::Class::Dir->new("/some/dir/path"); my @sub_dirs = grep { $_->is_dir } $parent->children;