<div>Thank you very much for your reply . This code actually solved my problem and returned exact matches between the two files (irrespective of their location in the files) . As I understood , it will list each data showing to which file it belongs (or it is common to both files) . It is really what I wanted .</div>

<div>Sincerely Yours</div>
<div><br><br> </div>
<div class="gmail_quote">On Wed, Dec 2, 2009 at 9:42 AM, Simon Banton <span dir="ltr"><<a href="mailto:centos@web.org.uk">centos@web.org.uk</a>></span> wrote:<br>
<blockquote style="BORDER-LEFT: #ccc 1px solid; MARGIN: 0px 0px 0px 0.8ex; PADDING-LEFT: 1ex" class="gmail_quote">
<div>
<div></div>
<div class="h5">At 08:54 +0000 2/12/09, hadi motamedi wrote:<br>>Dear All<br>>Can you please do me favor and let me know how can I compare two<br>>files but not in line-by-line basis on my CentOS server ? I mean say<br>
>row#1 in file1 has the same data as say row#5 in file2 , but the<br>>comm compares them in line-by-line basis that is not intended . It<br>>seems that the diff cannot do the job as well<br><br></div></div>This'll show you which lines are common to both files, and for the<br>
ones that aren't which file they're in.<br><br>perl -MData::Dumper -le 'while(<>) {chomp; push @{$s->{"$_"}},<br>$ARGV}; END{ print Dumper($s) }' file1 file2<br><br>... someone will be along shortly with a more elegant method.<br>
<br>HTH<br><br>S.<br>_______________________________________________<br>CentOS mailing list<br><a href="mailto:CentOS@centos.org">CentOS@centos.org</a><br><a href="http://lists.centos.org/mailman/listinfo/centos" target="_blank">http://lists.centos.org/mailman/listinfo/centos</a><br>
</blockquote></div><br>