http://qs321.pair.com?node_id=798411

BhariD has asked for the wisdom of the Perl Monks concerning the following question:

Hi, I am new to perl, and trying to extract raw data into a more meaningful format. Any kind of help will be appreciated. I have this input file with two columns each one is filled in an array NP_041954.1 NP_848263.1 NP_041955.1 NP_041956.1 ----- 1 row NP_041956.1 NP_041955.1 ------ 2 row NP_041957.1 NP_848264.1 I want to get the columns for the condition where- column[0] of one row is equal to column1 of another row and vice versa. For example this condition holds true for 1st and 2nd row above. I need the print out only once showing the column 1 and column 2 (i.e in this case- NP_041955.1 AND NP_041956.1) for which the condition is true. What will be a good approach to get this? Thanks