6

Right now I'm learning the Perl 6 language, and I'd like to know how to convert an url to an IP address

It seems to me that the gethostbyname function does not exist.

7hsk
  • 335
  • 2
  • 10

1 Answers1

7

gethostbyname is obsoleted by now. getaddrinfo is used instead. You will have to use the NativeCall API to call this POSIX function. The example included in the NativeCall page addresses precisely this problem.

jjmerelo
  • 22,578
  • 8
  • 40
  • 86