Hi I am a perl newbie and have a real life problem that I am trying to solve:
I have a file with 4 columns of data:
HWUSI-EAS95L_0025_FC:3:1:5232:1082#0/1 - 1449586 1449619
HWUSI-EAS95L_0025_FC:3:1:5232:1082#0/2 - 1449544 1449577
HWUSI-EAS95L_0025_FC:3:1:6417:1078#0/1 - 4744083 4744113
HWUSI-EAS95L_0025_FC:3:1:6539:1083#0/1 - 4867122 4867157
HWUSI-EAS95L_0025_FC:3:1:6539:1083#0/2 - 4866942 4866977
HWUSI-EAS95L_0025_FC:3:1:10260:1083#0/1 + 1930232 1930266
HWUSI-EAS95L_0025_FC:3:1:10260:1083#0/2 + 1930354 1930389
I would like to be able to match the lines within the first column based on name
ie
HWUSI-EAS95L_0025_FC:3:1:5232:1082#0/1 and HWUSI-EAS95L_0025_FC:3:1:5232:1082#0/2
belong together and then parse out information (1449586) from column 3 for the first line
and (1449577) column 4 for the matched second line.
Where there is no matched pair eg HWUSI-EAS95L_0025_FC:3:1:6417:1078#0/1
I want to skip onto the next line and look to see if there is another matched
pair.
Any pointers would be appreciated.
Thanks
Gary
In reply to compare lines within a file by garyboyd
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |