in reply to host with multiple ip addresses

Have you tried using the "raw" gethostbyname() call in perl (see perldoc perlfunc). I think that should return what you want:
($name,$aliases,$addrtype,$length,@addrs) = gethostbyname($name);
Michael