use File::Find; find({wanted => sub {print $File::Find::name if -d} no_chdir => 1}, ".");