25kisna has asked for the wisdom of the Perl Monks concerning the following question:

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.
  • Comment on What is the alternate API's for inet_pton and inet_ntop in 5.10.1 perl version

Replies are listed 'Best First'.
Re: What is the alternate API's for inet_pton and inet_ntop in 5.10.1 perl version
by VinsWorldcom (Prior) on Mar 24, 2016 at 11:19 UTC
Re: What is the alternate API's for inet_pton and inet_ntop in 5.10.1 perl version
by Anonymous Monk on Mar 24, 2016 at 10:24 UTC