I don't see anything there about it, and even if you're correct...

It looks like wikipedia is not an authoratative source on IP addresses ;) I believe IPv4 is described in detail in RFC 791 (would someone please correct this if I gave the wrong rfc please!) IPv6 is detailed in RFC 2460.

IPv4 addresses are just 32 bit numbers that are displayed as a dotted quad for our convenience. It is much easier (at least to my eye) to look at and understand "10.0.0.1 netmask 255.255.255.0" than "167772161 netmask 4294967040", even though they are equivalent. Look at the following examples if you don't believe this.

perl -e 'print "true!" if 10 * 256**3 + 0 * 256**2 + 0 * 256 + 1 == 16 +7772161' # prints true!

or try this:

$ ping 167772161 PING 167772161 (10.0.0.1): 56 data bytes ^C --- 167772161 ping statistics --- 2 packets transmitted, 0 packets received, 100% packet loss

In reply to Re^3: Regular Expression to Match IP Address by bmann
in thread Regular Expression to Match IP Address by sashac88

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.