First I count total number of different coulmnswithin a pair of X1 and Y1across from cloumn A to B, If data is missing (-/-) or unscorable (Z) for any one of X1 or Y1 with in a pair of X1Y1 then if condition consider that column is same between X1 and Y1 else that column is different. I tried folowwing code to do that but not succeed,

Re: [genetist] how to compare rows in same file with perl
[In reply to]

Can't Post

Please include your file as an attachment to your post. With your data being refomatted by the site, it is almost impossible to know what your data really looks like.

As for your code, I can only say at this point that $row1 $row2 are not initiazlized anywhere, so that your comparison if($row1==$row2) is doomed to fail or to do something else than what yuou expect. And of course nobody can guess what they are supposed to contain.

You should always start your script with:

Code

use strict; use warnings;

That would force you to declare your variables (with the "my" keyword) and tell you about these types of mistakes.

Re: [genetist] how to compare rows in same file with perl
[In reply to]

Can't Post

I downloaded your attachment. It is a .zip file containing several excel (not csv) files. None of the files are named perl or example. If this is the correct data, please explain how to read it. If not, download the correct file. Good Luck, Bill

Re: [BillKSmith] how to compare rows in same file with perl
[In reply to]

Can't Post

Bill, I *think* that the latest Excel file format is actually a zip file containing a bunch of XML sub-files. Some change having to do with the fact that numerous European (and possibly other) states (and/or perhaps the European Union) threatened not to use Excel if the file format did not become open.

Re: [genetist] how to compare rows in same file with perl
[In reply to]

Can't Post

I can now open your data file with EXCEL. Unfortunately, I still cannot understand your description of your problem. Perhaps, you could do one match for us by hand using the EXCEL data we already have. (Refer to the data using EXCEL's row and colulmn addresses.) Good Luck, Bill