scperl has asked for the
wisdom of the Perl Monks concerning the following question:

During a process it generates the temporary files with (.new) as suffix to the source files and it show the difference between the source and temp files on screen Source files are file1.h , file2.h and readme.txt

During the process created temporary files are file1.h.new , file2.h.new and readme.txt.new

So you want a diff of the output files without anything from the intermediate steps? Well, that depends on your process - if it clobbers previously seen differences, you're better off setting your process right than fudging with intermediate diff files. Now, that said, let's move on to the actual task:

Your question sounds a lot like a task for a diff tool. Did you check if your diff tool (available on *nix machines) doesn't already do the job for you? diff -u or something similar? You can also look at Text::Diff by Ovid.