in reply to gethostbyname Problem on solaris 10
So what happens when you implement a dead simple test case like:
#!/usr/bin/perl # get host by name exploration # get me is the test hostname I set up to try this out it has 35 addre +sses assigned to it. ($name,$aliases,$addrtype,$length,@addrs) = gethostbyname "getme.patc +h.com"; # print "$name $aliases $addrtype $length\n"; foreach (@addrs) { ($a,$b,$c,$d) = unpack("C4",$_); print "$a.$b.$c.$d\n"; } # yep, most of the above is cut and paste from perlfunc manpage
??
|
|---|