in reply to Get folders in a directory with 20k directories?
Use find. Then you can do something else with the directories using xargs and get the benefit of multiple threads and parallel processing. Just have perlscript.pl process @ARGV.
find /root/directory -type d | xargs perlscript.pl
|
|---|