What happens if you have:
group1 10 20 group1 18 22 group1 25 21
When looking at the first numbers, 10 and 18 are less than 10 apart, 18 and 25 are less than 10 apart, but 10 and 25 aren't. Do you want to keep the 10 (because it's the lesser of 10 and 18). Do you want to keep the 18? (because it's the lesser of 18 and 25). Keep them both? Is the 25 discarded? And if I have
group1 10 20 group1 15 25
What is the result?
group1 10 25
that is, take the lesser of (10, 15) and the greater of (20, 25)?

Finally, what if I have:

group1 10 15 group1 15 50
The first numeral values are less than 10 apart, so you keep the 10. But 15 and 50 are more than 10 apart. What's the result?

In reply to Re: compare values within a hash by JavaFan
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.