in reply to Directory path and -d??

You could also try the glob() function.
foreach(glob('d:\*')){ if(-d $_){ print "Directory: $_\n"; } }

- Tom