in reply to Text::Diff help
If you change the line to
my $diff = diff "output.new", "output.new", { STYLE => "Unified" , OUT +PUT => \*DIFF };
what is the output then? If you see the whole file the diff module is implicated. If not, it could mean there are white space differences in your files. Did you check the files with the diff command line tool?
UPDATE: You never close the file output.new after you write to it. The data is probably still in the buffer waiting to be written to disk when you do the diff (disk operations are buffered so that not every write of a single character rewrites a whole disk block). Only after the script finishes, close is called automatically and the contents written
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Text::Diff help
by whittick (Acolyte) on Feb 23, 2012 at 11:35 UTC | |
by whittick (Acolyte) on Feb 23, 2012 at 11:41 UTC |
In Section
Seekers of Perl Wisdom