Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re: The situational efficiency of File::Find

by SilverB1rd (Scribe)
on May 09, 2001 at 18:10 UTC ( [id://79087]=note: print w/replies, xml ) Need Help??


in reply to The situational efficiency of File::Find

If you have lots of files you can brake it down into 2 readdirs.

Untested script
@UserDirectorys = (); opendir (DIR, "/user/"); @UserDirectorys = grep {not /^(\.\.?)$/} // probably not the best wa +y to do this readdir(DIR); closedir (DIR); foreach $USER ( @UserDirectorys ) { @UserFiles = (); opendir (DIR, "/user/$USER"); @UserFiles = readdir(DIR); closedir (DIR); # Search @UserFiles for files needed.... }
This way you would not have to read in every file from every folder at one time.

------
The Price of Freedom is Eternal Vigilance

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://79087]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others learning in the Monastery: (2)
As of 2024-04-25 19:12 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found