in reply to Re: Using directory handles in recursive functions
in thread Using directory handles in recursive functions

Most likely it's because I found File::Recurse first...

The real answer is File::Recurse allows one to set the maximum depth, and has the ability to pass a parameter with that permits easy 'statefulness'. If you were building a directory of files, and wanted to assign a unique identifier to each and every entry, then File::Recurse would be the tool.

For your purposes, File::Find would work fine, and might be more appropriate. Since I cut'n'paste a good bit, and File::Recurse is installed, I just tend to gravitate for it.

But being a good Perl monk, you'll explore the documentation for both, make an informed judgement, and use the best tool. Right?

--Chris
  • Comment on (jcwren) RE: Re: Using directory handles in recursive functions