$File::Find

From: Pierre-Yves (pyu-at-belbone.be)
Date: 08/16/04


Date: Mon, 16 Aug 2004 10:09:13 +0200

Hello,

I have to loop recursively in directories to build a tree. Based on the
directory name, I know I can skip some (i.e: the BACKUP ones) to improve the
performances that are currently very bad :

At the moment I use find(&listFolders, $entrypoint)
In the sub "listFolders" I do $File::Find::name if -d && !/^.$/;
It works but but it's terribly slow and since it's used in a CGI, I can't
let the users wait several minutes each times.
I tried to add "next if /\/BACKUP$/;" but it doesn't seems to work.

here is how the directory structure looks like :

/source/
    /répertoire1
        /répertoire11
            /répertoire111
            /BACKUP
            ...
        /répertoire12
        /BACKUP
    /répertoire2
        /répertoire21
        /BACKUP
        ...
    ...

If someone can help, I would really appreciate... I'm new at Perl and I'm
not yet very familiar with this language.

Thanks in advance !



Relevant Pages

  • Re: Precedence of exponentiation
    ... it's a valid question about how the Perl ... Perl6 is a different language, which won't happen any time soon. ... :) that the precedence of unary minus seems to behave differently on the ... :) Tree: ...
    (comp.lang.perl.misc)
  • Re: basque and circassian
    ... The alleged correlation between genes and language is fraudulent (as I ... This dual tree lists 38 populations, ... There is not much overwhelming agreement among linguists about the ...
    (sci.lang)
  • Re: GMP vs. straight C arithmetic
    ... ordinary data structures that don't impose an additonal performance ... Side-effects are another crucial part of the language. ... > Take the tree structure example I gave earlier. ... determined at compile time, is this a compile time error? ...
    (comp.programming)
  • Re: Chemistry from a Bahai perspective
    ... Hi Matt. ... Naming conventions generally hold that the name of an item should ... A tree is named and generalized into human language so that, most often, we ...
    (soc.religion.bahai)
  • Re: Request
    ... >>large enough section of DNA will produce the same tree. ... >>around for a language that is close to what they ... >>sometimes combine features from two or more separate languages ... >>But if everything comes together in a single consistant tree, ...
    (talk.origins)