http://qs321.pair.com?node_id=180000


in reply to Re: Re(3): Find and Print Directory Names
in thread s and replace

You really, really should consider File::Find (I see its already been suggested, but I think its worth mentioning out again).
use File::Find; find (sub { print "$_\n" if -d; }, $dir);