http://www.perlmonks.org?node_id=109270


in reply to How do I find directories within directories using : parse_dir(`ls -l`)

If using parse_dir isn't a hard requirement, you can read directories using the normal, built-in means: readdir.
opendir DIR, $path or die "can't read $path: $!"; @dirs = grep -d "$path/$_", readdir DIR; closedir DIR;