http://qs1969.pair.com?node_id=79087


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