Thanks Java
I didn't realize how vague I was until I read it again. The file is sorted lexically. Also, in all cases, the lesser of the two numbers is in the first column. I basically am trying to say that foreach same group, are the numbers in the first column within 10 of each other. If yes, are the numbers in the second column ALSO within 10 of each other.

Your example would give me.

group1 10 25

This assumes that the last row would actually be

group1 21 25

But they idea is to collapse all three lines into one. I am looking for a "window" or frame that would essentially include all of the overlapping lines collapsed into one. Eventually, I will use the single lines in downstream applications.

You folks are fantastic. I work with people that are great programmers, not so great at explaining why I need to do why they say!


In reply to Re^2: compare values within a hash by rookierabbit
in thread compare values within a hash by rookierabbit

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.