perl differ
$file1 = shift;
$file2 = shift;
%file;
open(FH,"$file1");
@FILE1 =
close(FH);
open(FH,"$file2");
@FILE2 =
close(FH);
foreach $line (@FILE1) {
chomp($line);
($hash,$file) = split(/ /,$line,2);
$file{$file} = $hash;
}
foreach $line2 (@FILE2){
chomp($line2);
($hash2,$file2) = split(/ /,$line2,2);
if(!(defined($file{$file2} ) ) ) {
print "file not present in first: $file2 \n";
}else{
if($file{$file2} ne $hash2) {
print "File diff: $file2\n";
}
}
}