A standard Class C network consists of 256 addresses (0 to 255 inclusive), of which one is the network address (.0) and the other is the network broadcast address (.255). Although there are exceptions you can't really use .0 or .255 so there are really only 254 useable addresses.

As a policy I would use < 255 myself as would deal with edge cases where ips are repeated more than once. I have some trial software that amuses me with it's message that it expires in -119 days. Clearly they coded an == rather than a < 0.

To make this stype of solution reliable you need a pre-filter to exclude duplicate ips from the list as our logic requires that they must be unique. In this case the OP is using that so all will be well.


In reply to Re^3: Matching Sequential IP Addresses by tachyon-II
in thread Matching Sequential IP Addresses by Dru

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.