At 11:19 AM 11/8/01 -0300, Papo Napolitano wrote:
>Hi list!
>
>I was wondering what's the difference between using:
>
>1) $blah = pack('S n a4 x8', 2, 80, (gethostbyname("whatever.com"))[4]);
>2) $blah = pack('S n a4 x8', 2, 80, inet_aton("whatever.com"));
>3) $blah = sockaddr_in(80, inet_aton("whatever.com"));
>4) $blah = sockaddr_in(80, (gethostbyname("whatever.com"))[4]);
>
>Is it just a matter of taste, of portability?
They're all somewhat retro :-) Just use IO::Socket and this is a lot
easier on the eyes:
$blah = IO::Socket::INET->new("whatever.com:80");
--
Peter Scott
Pacific Systems Design Technologies
http://www.perldebugged.com
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]