Comparing fields in 2 large files
[email protected] ("Ferry, Craig")
| Newsgroups | perl.beginners |
|---|---|
| Message-ID | <[email protected]> |
I am new to perl and would appreciate any suggestions as to how to do the following. I have two files, one with 3.5 million records, the other with almost a million records. Basically here's what I need to do. See if field_1 in file_a is part of field_1 in file_b If so, see if field_2 in file_a is part of field_1 in file_b If so, see if field_3 in file_a is equal to field_2 in file_b If not equal, write out field_4 in file_a plus field_3 in file_b I have written a script that will do this, but it runs literally for days. I'm guessing my method is not the most efficient. I do not have enough memory to read the files at one time into an array. Thanks in advance for ideas. Craig