my @found; File::Find::find({wanted => \&wanted], '.'); sub wanted { if (-d $_) && ($_ != '.') && ($_ != '..') { push(@found, $_) } }