in reply to Re: Using diff in perl
in thread Using diff in perl

My script will work on the results of running a testcase The testcase run creates a few data file. We compare the data files with the data.gold files which have been created. So all this script will do it will do a diff between the data file created and the data.gold file. It will ignore lines like "Testcase ran on server x" etc., or WARNING, logs will be created in directory y. this way we diff only the relevent data while ignoreing a preset data. Earlier we had one data file to be compared with data.gold file So all I did was a diff data.gold data --ignore-matching-lines="regexp". Now I will compare multiple files and make a composite DIFF file containing the differences.

Replies are listed 'Best First'.
Re^3: Using diff in perl
by bart (Canon) on Apr 05, 2006 at 09:11 UTC
    I'm wondering if you shouldn't try using a plain diff tool, and postprocess the result with Perl. I personally find the output of diff -u very easy to parse.
      thanks, I am going to use GNU diff and then post process the results. this will be simpler and faster