At 02:49 PM 6/25/01 -0400, Bill Pierson wrote:
>Greetings all. I'm new to the list, and this is my first post, please
>excuse my ignorance if I ask a question that has already been addressed.
>
>I need some help finding a program or script that will merge/sort a 250+MB
>file as quickly as possible.
>
>For example - I have 2 files. File A, and File B. I need to take File A
>and compare it against File B, and the result will be File C which is File
>A with all the entries in File B removed, sorted alphabetically. Please
>note that File B is over 250MB in size, and file A can range from 1MB to
>100MB in size.
>I also need to take the contents of File A and File B, merge them
>together, and remove the duplicates.
>
>Any help would be appreciated!
You need a merge sort using temporary files as work space.
I didn't find any Perl modules for doing this (surprisingly). Look up a
merge sort algorithm on the web and turn it into Perl, shouldn't be hard.
--
Peter Scott
Pacific Systems Design Technologies
http://www.perldebugged.com