in reply to Re: gethostbyname not working
in thread gethostbyname not working

This gets me further, when I print them out however, I get numbers that are no relative the the IP address, or even close. for instance,
my $hostname = ''; my $addr = (gethostbyname($hostname))[0]; my ($a,$b,$c,$d) = unpack('C4',$addr); print "$a.$b.$c.$d\n";

This prints out:
which is not even close to yahoo's IP (I know yahoo has a large subnet, but this doesn't even start with the same number). Any ideas?