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 ...
Get Win32 Perl Programming: The Standard Extensions, Second Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.