Relate to comparing the data of two files

Hi Dave sir,
I am writing my driver data in one file(drv_data.txt)and the same data I am monitoring from the interface through my monitor and writing in another file(mon_data.txt).
Now I want to compare the data of both files in my scoreboard.
Can you tell me please that how I can compare the data of these files?

In reply to Rajneesh Kumar:

Why do you want to compare data from files. Your scenario is a loop way. Instead of writing your data to files you can use uvm_analysis fifo for both data streams an compare your data on the fly. This way you are saving resources.
If you want to use your files you have to open them and then reading line by line, scanning the format and compairing the scanned data. This is simple Verilog knowledge.

In reply to chr_sue:

Thanks for the reply.
Sir,
I Know that FIFO concept.
But I want to compare the data of two files.
Like in one file I have data- xin[0][0]=5
xin[0][1]=72…and so on
Same data I have in another file with the same value at the same index.
so can you tell me how to compare data of two files?
I hope my question is clear.