Whoa. There is so much about your post that is incomprehensible (and so much of it) that it's hard to figure out where to start. I'll try an unordered list...

There are some "stylistic issues" too, but no point going into that, given the issues above.

So how about you start over with first principles: you've given a sample of one of the "original" input files, so how about you give (a) a sample of the other input, (b) the intended output, and (c) a brief summary of the criteria and relations that cause the output to be what it is. Think of that summary in terms of a synopsis or a minimal recipe -- that is, think about how you would document this process, how you would provide an overview of what the program is supposed to do. (My rule: write the docs/specs first, well enough that someone else can understand them, before writing any code.)

Forget about the code you've posted -- it's entirely wrong and it should be deleted. Write the concise description of what your process must do in terms of the input, the output and the logic that relates these two. Then start writing the code from scratch to address that description (or start a new SoPW thread with a question about how to approach that task).


In reply to Re: nmr comparison script by graff
in thread nmr comparison script by NMRsucks

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.