The value of 291 seems awfully high. Most of the ip's that I work with have 0, 1, or 2, sometimes more. They refer to the number of prefixes, "/nn", for point-to-point networks. The + sign means that it has been signed with an extra 32-bit integer, again, for point-to-point broadcast purposes. It may make more sense if we look at the whole bundle of methods.
#!/usr/bin/perl -l use strict; use warnings; use Net::IP qw/:PROC/; use Data::Dumper::Concise; my $netip = new Net::IP ('157.166.255.18') or die (Net::IP::Error()); print Dumper( "IP : " . $netip->ip(), "Sho : " . $netip->short(), "Bin : " . $netip->binip(), "Int : " . $netip->intip(), "Mask : " . $netip->mask(), "Last : " . $netip->last_ip(), "Len : " . $netip->prefixlen(), "Size : " . $netip->size(), "Type : " . $netip->iptype(), "Rev : " . $netip->reverse_ip(), "Pre : " . $netip->is_prefix(), ); print Dumper( $netip );
You'll be able to get more information from a post by the author: Managing your IP space with Perl.

In reply to Re: Net::IP convert ip to int by Khen1950fx
in thread Net::IP convert ip to int by Anonymous Monk

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.