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

But this will still search through the directory wont it? the find function is the one thats doing the traversing so isn't it too late to deal with it in the edits() function?
  • Comment on Re^4: Skipping directories using File::Find

Replies are listed 'Best First'.
Re^5: Skipping directories using File::Find
by GrandFather (Saint) on Jan 25, 2006 at 11:35 UTC

    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
      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