$File::Find
From: Pierre-Yves (pyu-at-belbone.be)
Date: 08/16/04
- Next message: Scott: "Parsing a text file into an array"
- Previous message: Gunnar Hjalmarsson: "Re: variable function name"
- Next in thread: nobull_at_mail.com: "Re: $File::Find"
- Reply: nobull_at_mail.com: "Re: $File::Find"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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 !
- Next message: Scott: "Parsing a text file into an array"
- Previous message: Gunnar Hjalmarsson: "Re: variable function name"
- Next in thread: nobull_at_mail.com: "Re: $File::Find"
- Reply: nobull_at_mail.com: "Re: $File::Find"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|