Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re: perl and getaddrinfo API

by trippledubs (Deacon)
on Apr 20, 2016 at 12:53 UTC ( [id://1160989]=note: print w/replies, xml ) Need Help??


in reply to perl and getaddrinfo API

my @ip = map { hex($_) } map { /(..)/g } unpack("H*",$pip); print join '.',@ip;
Since the system call gethostbyname results in a C struct, it can be unpacked.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1160989]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others exploiting the Monastery: (3)
As of 2024-04-19 22:54 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found