use File::Find; find (sub { print "$_\n" if -d; }, $dir);