in reply to Re: compare two files line by line and perform a diff on each coressponding line
in thread compare two files line by line and perform a diff on each coressponding line

Thanks jethro and all , this seemed to work
#! /usr/bin/perl use File::Compare; open (IF,"<tst1"); open (IF2,"<tst2"); my(@tst1) = <IF>; my(@tst2) = <IF2>; my ($i); my ($j); while (@tst1) { $i=shift @tst1; $j= shift @tst2; chomp($i); chomp($j); #print "$i\n"; #print "$j\n"; if (compare("$i","$j") == 0) { print "$i $j are equal\n"; } else { print "$i $j are not equal\n"; } } close(IF); close(IF2);
  • Comment on Re^2: compare two files line by line and perform a diff on each coressponding line
  • Download Code