What is this for (what is your ultimate goal -- Heard of
Plucene?
Heard of
DB_File {would help with memory overhead and the sorting}))?
Now looking at the code...
- One easy way to speed this up is to implement caching. If the timestamp hasn't changed, no need to rescan the entire file/directory.
- Don't build a giant array only so you can build a giant hash afterwards, just build the giant hash ($wordlist{$word}++).
- Why are you keeping a @DirList? You don't appear to be doing anything with it, might think about timestamps again.
- You can write foreach my $SUBDirItem( @SUBDirList ){ ... }
- Are you sure you wanna die (ex, you've reached the last two files, and you can't read the one before last, why not just move on to the next one)?
| MJD says "you can't just make shit up and expect the computer to know what you mean, retardo!" |
| I run a Win32 PPM repository for perl 5.6.x and 5.8.x -- I take requests (README). |
| ** The third rule of perl club is a statement of fact: pod is sexy. |