You're not really doing this recursively. It looks like your loop will only descend one level. File::Find is the canonical way to walk a directory tree.
If you modify this to recurse by defining a sub which calls itself on seeing a directory, be careful to not clobber the newDIR global handle. You can do that by either localizing the global handle or else using lexical handles.
After Compline,
Zaxo
In reply to Re: Recursive Directory Listings
by Zaxo
in thread Recursive Directory Listings
by curtisb
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |