in reply to File Indexing program

Why not see how File::Find performs:
use File::Find; sub wanted { warn "adding $File::Find::name\n"; push(@mainarray, $File::Find::name); } find(\&wanted, "D:"); writefile(); print "complete\n"; <STDIN>;

Replies are listed 'Best First'.
Re^2: File Indexing program
by jettero (Monsignor) on Jun 24, 2008 at 19:56 UTC
    I second this. It'll not only do a better job in less space, but it will avoid some of the pitfalls of doing it by hand. You will eventually run into trouble with symlinks and things if you do this by hand.

    There are times when it's appropriate to do so. Say you have a well behaved directory with hundreds of thousands of files in it and you need just one type... You might get a slight speed advantage with readdir/stat...

    Other than things like that, there's rarely a need to use readdir by hand.

    -Paul