in reply to File/Directory question

Use <FILE> to read the file, use a %hash to store the part numbers, use File::Find to search through the subdirectories and use File::Copy to move the duplicates.

Replies are listed 'Best First'.
Re^2: File/Directory question
by bzenker (Initiate) on Dec 21, 2004 at 17:12 UTC
    Thanks for the quick reply. It makes sense to me.. If I have problems I will post again.
Re^2: File/Directory question
by bgreenlee (Friar) on Dec 21, 2004 at 18:21 UTC

    You probably don't want to run File::Find for every one of your 2000 or so parts. Use it to preload your directory information into some kind of hash structure, then check each part against that structure rather than doing to disk every time.

    Update: duh moment...I'm sure BUU wasn't thinking of running File::Find every time; you just check your hash of part numbers in the 'wanted' subroutine of File::Find, which just gets run once.

    -b