rename "output.new","output.old"; ... diff "output.new", "output.old", ...
If the rename call succeeded (you should really check that, or use autodie), then output.new doesn't exist anymore. I guess that diff just treats is as empty, which is why it shows you that the whole contents of the second file as output (the diff is really the whole file).
Also it seems odd to me that once you compare 1.log and 2.log, and then based on the result of that comparison, you report the difference between two different files. But you might have your reasons for that.
In reply to Re: Text::Diff help
by moritz
in thread Text::Diff help
by whittick
For: | Use: | ||
& | & | ||
< | < | ||
> | > | ||
[ | [ | ||
] | ] |