Resolving DNS Names
Few things in life bring as much joy to a network administrator as being able to resolve DNS names to IP addresses. And, of course, Win32 Perl has many ways to resolve DNS names. You can use the Net::DNS module available from CPAN or Perl’s built-in DNS functions such as gethostbyname() and its brethren. Win32 Perl did not always have such rich DNS support (early versions did not support the built-in functions). Because of this, the Win32::AdminMisc module included a few functions that are still available:
Win32::AdminMisc::GetHostAddress( $DNS_Name ); Win32::AdminMisc::gethostbyname( $DNS_Name ); Win32::AdminMisc::GetHostName( $IP_Address ); Win32::AdminMisc::gethostbyaddr( $IP_Address );
These four functions all work ...