in reply to Re^3: Need to have perl script to compare two txt files and print difference along with under which segment the difference is
in thread Need to have perl script to compare two txt files and print difference along with under which segment the difference is

Can someone pls help..
  • Comment on Re^4: Need to have perl script to compare two txt files and print difference along with under which segment the difference is

Replies are listed 'Best First'.
Re^5: Need to have perl script to compare two txt files and print difference along with under which segment the difference is
by BillKSmith (Monsignor) on Jan 24, 2019 at 14:13 UTC
    Please tell us more about your input files.
  • Do they both have EXACTLY the same segments? What do we do if not?
  • Are the segments always in the same order in both files?
  • Do you know the segment names (or even the number of segments) in advance?
  • How many differences do you expect to find in a pair of very large files?
  • Your sample data has very short records. Is this typical?
  • What is the typical (and max) number of records in one segment?
  • How can we always tell a segment name from a data record?
  • Is there anything else you know which might help us?
  • Bill
      Hi Bill,

      Thanks for you reply. As we are in the beginning phase of our work, it wouldn't possible for me to answer few of your questions. But as of now one of the member from forum posted code, which is working for whatever the requirements we have for now. We are expecting around 2000 to 3000 records in a pair of files. Thanks for your time. i will get back here if i need more help from you guys..

Re^5: Need to have perl script to compare two txt files and print difference along with under which segment the difference is
by haukex (Archbishop) on Jan 24, 2019 at 13:43 UTC

    Hello and welcome to the Monastery, User_04271983. Please be patient - many of us have jobs and are spread out in different timezones. At first glance it looks like you've provided a good amount of information, I'm sure someone will get around to looking at it all.