I am using the diff command as follows
use Text::Diff;
my $diff = diff "C:/after.txt", "C:/before.txt", { OUTPUT => \*DIFFILE
+, STYLE => "Table" };
and I get the following in the file pointed to by DIFFILE:
+--+----------------------------------------------------------------------------------+----------------------------------------------------------------------------------+
| |C:/before.txt |C:/after.txt |
| |Thu Dec 22 12:00:23 2011 |Thu Dec 22 12:01:12 2011 |
+--+----------------------------------------------------------------------------------+----------------------------------------------------------------------------------+
* 1|MONA|Female|20610|Mother-In-Law |MONA|Female|20610|Lord Godess of the Universe *
|
2|SAM|Male|13122|Doctor |SAM|Male|13122|Doctor |
|
3|BOB|Male|11623|Accountant |BOB|Male|11623|Accountant |
+--+----------------------------------------------------------------------------------+----------------------------------------------------------------------------------+
The first line is definitely different between the files and should appear in the 'diff' table. But...
Question: Why do I get the next 2 lines back when they are identical?
These files that are being compared have exactly 1000 lines of which only the first line is visibly different. So the first line is the only one that should come back in the diff table.
Using Perl 5.14.2 on Win32
Cheers!