in reply to (jcwren) Re: Using directory handles in recursive functions
in thread Using directory handles in recursive functions

File::Recurse seems to be very similar to File::Find which is part of the standard distribution. What advantages do you get from using File::Recurse?


--
<a href="http://www.dave.org.uk><http://www.dave.org.uk>

European Perl Conference - Sept 22/24 2000
<http://www.yapc.org/Europe/>
  • Comment on Re: Using directory handles in recursive functions

Replies are listed 'Best First'.
(jcwren) RE: Re: Using directory handles in recursive functions
by jcwren (Prior) on Jun 21, 2000 at 17:16 UTC
    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