in reply to Read directories' contents, add subdirs back into directory list
This way you can throw stuff anywhere you want to in @dirs, and it'll all get processed eventually. By changing the push to an unshift, you'll get a depth-first search instead of breadth-first. Nifty, eh?while(@dirs) { my $dir=shift @dirs; # Rest of loop here }
You do have a couple of other small bugs, which other posters have pointed out.
|
|---|