Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re^3: difficulty in matching 2 fields of a same line

by choroba (Abbot)
on Jun 27, 2012 at 17:42 UTC ( #978731=note: print w/ replies, xml ) Need Help??


in reply to Re^2: difficulty in matching 2 fields of a same line
in thread difficulty in matching 2 fields of a same line

Oh, I see. Can you give an example of a line that is being printed, but should not be? It seems to work for me. Please, use <c> tags around the data as well as code.


Comment on Re^3: difficulty in matching 2 fields of a same line
Re^4: difficulty in matching 2 fields of a same line
by Anonymous Monk on Jun 27, 2012 at 17:49 UTC

    its working for me wen the positions are same but for few in a file wer the positions are changing how to deal with them there might be 30-40 lines with varied positions hw do i deal with them.

      Can you give an example?

      Do you mean that there are lines where you want to compare fields 3 and 11, and other lines where you want to compare, say, 6 and 8, and others where fields 2 and 9 are relevant? If that's what you mean, then I suggest you provide us with the rules that decide which fields are of relevance. If this is not what you mean, then yeah, maybe you should give us an example to show what you mean.

        example
        14975:50417 1:N:0:CGATGT - chr11 108607098 GCTAGCTTACAGGTCACCTTGCTTGGTGTGGACAGT JJIIJJJGGGIJHHHFJJJIJJJHHHHHFFFFFCCC 0 33:A>T,34:G>C 14975:50417 2:N:0:CGATGT + chr11 89267281 TCATGAAGTATAAAGTTACAGGGTGGTGATGTGATT CCCFFFFFBHHHFIJIIIIIIIJAFH<FFHIGIIIJ 0

        my code shud not be printing this line because here both fields are equal but it does because there are sm extra tabs. how do i tell it to compare only those fields starting with chr in a given line?

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://978731]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (8)
As of 2014-12-29 10:50 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (186 votes), past polls