To compare if an IPV6 address matches to another IPV6 address, we use inet_pton() and inet_ntop() APIs. In Perl package (5.14.2) kernel exports these API to users but the perl package (5.10.1) kernel does not. Is there anything equivalent to these two APIs in the older perl packages which can be used to compare IPV6 and IPV4 addresses. Let me know. and also i used in perl script following use Socket qw(getaddrinfo getnameinfo); While executing the script, I got the same errors which I was getting for inet_pton and inet_ntop APIs- "getaddrinfo" is not exported by the Socket module "getnameinfo" is not exported by the Socket module Can't continue after import errors at ./temp.pm line 5 BEGIN failed--compilation aborted at ./temp.pm line 5. These APIs are also not available in perl 5.10.1.

In reply to What is the alternate API's for inet_pton and inet_ntop in 5.10.1 perl version by 25kisna

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.