I am trying to make script in perl which compare two files (format doesn't matter), both files have few similar data but whatever diff between two should be print out error.txt.
Suppose file1 and file2 are files which has to compare but the logic is compare file2 over file1 and whatever changes in file2 should be printed as "Error: lineno:(no. at the point of mismatch) please check error" in error.txt.
file1:
Figure 1.
Somatotropes are organized into.
Figure 2.
Comparing two xml files organized into.
Figure 3.
Somatotropes presentation of GH1,
file2:
Figure 1.
children with acquired organized into.
Figure 2.
Severe anterior hypoplasia,
Figure 3.
Somatotropes presentation of GH1,
Error.txt:
Error:lineno:2 please check mismatch
Error:lineno:4 please check mismatch
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.