Get directory only once and put it in array with File::Find 
Author Message
 Get directory only once and put it in array with File::Find

I need an array that contains one element for each subdirectory found.

for every $_ (file that's found). In other words, if Folder1 has 10

I've thought of several possible hacks, but there has to be some
graceful way to do this.

use File::Find;
find (\&wanted, "$inputdir");

sub wanted(){
        if ($_ =~ /$filetype/){



        }

Quote:
}



Sun, 21 Aug 2005 21:10:44 GMT  
 Get directory only once and put it in array with File::Find

Quote:

> I need an array that contains one element for each subdirectory found.

> for every $_ (file that's found). In other words, if Folder1 has 10

> I've thought of several possible hacks, but there has to be some
> graceful way to do this.

perldoc -f -X
and look for the "-d" test.

jue



Mon, 22 Aug 2005 06:22:23 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. perl scripts tries to locate specific file, getting file not found

2. getting list of directories, returned as an array

3. newbie question: how put files from dir in array

4. Help Putting data from an file that Perl reads into a JavaScript array

5. WinNT: getting File Last Modified data from outside current directory

6. putting arrays in arrays!?!?

7. Getting program to restart (HUP) more than once

8. using File::Find to return a file array??

9. HELP: putting an @array into an %array???

10. File::Find with Compressed NTFS directories

11. Deleting empty sub directories with File::Find

12. File::Find directory conundrum

 

 
Powered by phpBB® Forum Software