User_04271983 has asked for the wisdom of the Perl Monks concerning the following question:
Hello, Can someone help out with a perl script to compare two files and print the difference along with segment name under which the difference is
Requirement I have tst1.txt and tst2.txt tst1.txt have data as below Note: ABCD & EFGH are segments in below data ABCD TEST1 TEST2 TEST3 EFGH TEST1 TEST2 TEST3 tst2.txt have data as below ABCD TEST1 TEST2 TEST3 EFGH TEST1 TEST2 TEST3 TEST4 TEST5 Now diff between two files is in tst2.txt the last two rows "TEST4", " +TEST5" I need to have a script which gives output as below Diff between two files is from segment EFGH TEST4 TEST5
I am calling EFGH as segment, and it is must to have it in output file eventhough segment name is same from both files(ex: EFGH from above data). Also the the text files contains around 2 thousand to 3 thousand records. I need to find out difference along with under which segment(Name) the difference is. Pls help..
|
|---|