As you can see the output of above files, The Amounts of first 4 records mismatch (3900 and 900 )in second file and they are not in sequnce too. Tht is, The First Row of MainData.csv can be in Thousandth row of PrabbalyMissing_Mismatch.csv and these can match or mismatch or might also be missed in the second file.

** ID1 , ID2 will be same in both the files ,only amount mistaches or If missed the that row will not exist at all

I have to compare the First File with Second File and see what records match or mismatch or missed in Second File So I have to check whether amounts match or mismatch or missed using a perl script .

The basic logic here is load the file to compare into an hash, then stepwise check the hash key with each line of the main file then if you like you can have different arrays or files opened to "put in" those line that matched or otherwise or just print it out like I did in the codes above. Hope this helps.

Wow.. Thts a wonder. This code dirrectly worked with some minor changes.. Thanks Bro

The only issue i have with the code after seeing the output is explained below

_DATA1_

ID1 ,AMT, ID2

CDZNYQ9R8108QR3E3EJ0,3900.00,351 CDZNYQ9R8108QR3E3EJ0,-3900.00,351

_DATA2_

CDZNYQ9R8108QR3E3EJ0,3900.00,351

We can see that we have 3900 in both and as per the code it will match obviouslly.. But the issue is the line 2 , as per the code it is mismatched(-3999 <> 3999). But , the requirement is once a line is matched, that should not be considered.

Codnitions are

1. If a line is matched , that shoudnt be considred as it is matched with some other line. 2 .The line is mismatched,only if the amount differs(Excluding condition 1 ,as it is matched and done) 3.If the whole line doesnt appear(The full line,not just amount) in second file, the it is mismatchde.

Above condtions are getting safisfied, code just needs to handle the first condition I tried to handle it but couldnt really succeed Need your help Thank You