in reply to Re^4: Skipping directories using File::Find
in thread Skipping directories using File::Find

It prunes the tree at the current level so any directories below the current one will not be visited and if you return before the edit processing the contents of the current directory are not processed either.

Remember that, in the normal course of events, edits() will be called for each directory in the tree. Setting prune modifies that behaviour.


DWIM is Perl's answer to Gödel
  • Comment on Re^5: Skipping directories using File::Find

Replies are listed 'Best First'.
Re^6: Skipping directories using File::Find
by doof (Initiate) on Jan 25, 2006 at 12:13 UTC
    Fantabulous, it seems to work. How come you dont have to reset prune to 0 after than directory?

    Thanks for everyones help

      Find does it for you. Reset before edits() is called and tested following the call.


      DWIM is Perl's answer to Gödel