Answers to ur questions are as follows:

a. How many even columns do you have?

b. How many odd columns do you have?

c. Are you just comparing items on the same line? If so, there may be no need to read all lines of your large input file into memory at once.

d. Or, do you need to compare an item on one line to items on all other lines?

e. What are you using the 1st column for?

Ans a-e: There are more than 1 million rows and columns. The first row is about the entity names and therefore, I want to remove that. Then, I want to compare the entire row with all the other rows and would like to know where I have same match. I am also not reading the entire file at once. I am using file handler and while loop for reading it one per line.

f. Are you comparing strings or numbers? Ans f: I am comparing the number or taking the difference between the two.

g.Show a small sample of your input (fewer than 10 lines, fewer than 10 columns). Creating a small sample for yourself will make it easier for you to debug your own code, so the extra effort should pay off.

Iid A1 A2 A3 A4 A5 A6 A7 A8 12 1 2 1 2 1 1 1 1 12 2 1 2 2 1 1 1 1 15 2 1 2 2 1 1 1 1 15 2 1 2 1 1 2 1 1 16 2 1 2 1 1 2 1 1 16 2 1 2 2 1 1 1 1 19 2 1 2 1 1 2 1 1 19 1 2 1 2 1 1 1 1 116 1 2 2 2 1 1 1 1 116 2 1 2 1 1 2 1 1

You will see that the 2 rows have same name, so I would like to take see the match between the rows at same column position i.e. first row of 12 with both the rows of 15, 16, 19 and 116. Similarly second column of 12 with both the columns of 15, 16, 19 and 116. Thanks a lot for sharing your views.


In reply to Re^2: Extract the odd and even rows seperately in the hash of arrays or some other data structure apart from arrays by snape
in thread Extract the odd and even columns seperately in the hash of arrays or some other data structure apart from arrays by snape

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.