Don't ask to ask, just ask | |
PerlMonks |
Re: 2 filesby Laurent_R (Canon) |
on Dec 05, 2018 at 23:50 UTC ( [id://1226810]=note: print w/replies, xml ) | Need Help?? |
Hi Deicide,
it would be most useful to see your code, as well as some samples of your input and desired output. As a general rule, when you're looking for records (or parts of records) that are in file 2 and not in file 1, the best method is to read file 1 and to store the data of interest of file 1 in a hash; and then to scan file 2 and keep the records not matching the hash. BTW, a hash will remove the duplicates. Not knowing anything about your input files (e.g., what is the record separator?), I can't suggest any real code. But the basic idea in pseudo-code is:
I (and other monks here) will be able to provide actual code if you provide the necessary information (especially sample input and desires output).
In Section
Seekers of Perl Wisdom
|
|