in reply to Re^4: 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

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
    • Comment on Re^5: 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^6: Need to have perl script to compare two txt files and print difference along with under which segment the difference is
    by User_04271983 (Initiate) on Jan 24, 2019 at 14:22 UTC
      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..