3 ($#ARGV == 1) || die "usage: cmp.pl <file1> <file2>\n";
5 open(IN0
,"<$ARGV[0]") || die "unable to open $ARGV[0]\n";
6 open(IN1
,"<$ARGV[1]") || die "unable to open $ARGV[1]\n";
14 $n1=sysread(IN0
,$b1,4096);
15 $n2=sysread(IN1
,$b2,4096);
32 printf STDERR
"$ARGV[0] and $ARGV[1] are different\n";
35 for ($i=0; $i<=$#a1; $i++)
37 if ($a1[$i] ne $a2[$i])
39 printf "%02X %02X <<\n",$a1[$i],$a2[$i];
45 printf STDERR
"diff at char $tot of $nm\n";