It's not clear to me what you're doing, but it sounds like you have the classic "diff3" situation, where a single file is changed to become two other files.
You may want to look at my Algorithm::Diff module. This can produce (among other things) an array of differences that can then be compared for their differences. But note that this information contains line numbers, whose position will change as A and B change from the baseline. That is, the original difference may say insert this line after line 5 of file A. However, if you add an identical line to the beginning of both A and B and do the diff again, you will see an output that says to insert this line after line 6 of file A. The only way I know to deal with this is to keep a baseline version of the A file, and do diffs with the newest versions of A and B, adjusting line numbers as needed. | [reply] |
just find the output of the DIFFERENCE between the difference two 'baseline' versions of the file and the difference of the latest versions of the file. this can be
done through perl language ? | [reply] |
Why not? Perl is capable of doing pretty much anything you can describe clearly how to do.
Do you have a clear-cut method (regardless of language) for doing this? If you can't describe how to do it (regardless of language), you probably can't do it in Perl or any other language.
I suggest you take a look at Algorithm::Diff, which implements the Hunt/McIlroy diff algorithm (which is used by the Unix diff tool). It may give you a way to get started.
| [reply] |