I need to compare two files. These files have a key and a value on each line. I need to note when a key is in one file, and not in the other. I also need to note when the keys match, but the values are different. ex. given:
I need 2 absent from right-file, 3 absent from left-file and 4 is different. diff works so long as difference are separated by one or mores lines with a matching key and value. With the above input files diff produces:
Which is not quite right. -Bass
has the beginnings of the shell of what I need. Being lazy, I was hoping the CPAN would have the algorithm I need, but I have found nothing. Note that the files are big, 1/2 million lines or so and the key and value are actually multiple fields.