use Socket; my $packed_ip = gethostbyname('slashdot.org'); my $ip = inet_ntoa($packed_ip); print "$ip\n";
Update: The parenthesis don't matter in this case. I usually use them to avoid precedence misunderstandings, though.
In reply to Re: gethostbyname bug?
by chromatic
in thread gethostbyname bug?
by geektron
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |