Paul Grinberg > Net-DNS-Nslookup-0.01 > Net::DNS::Nslookup

Download:
Net-DNS-Nslookup-0.01.tar.gz

Dependencies

Annotate this POD

CPAN RT

New  1
Open  0
View Bugs
Report a bug
Module Version: 0.01   Source  

NAME ^

  Net::DNS::Nslookup - Perl module for getting simple nslookup output.

DESCRIPTION ^

  Nslookup module provides simple way to resolve DNS name to 
  IP address(es) on a local system (Linux, Win*, Mac OS X 10.3.9, Solaris).

SYNOPSIS ^

  use strict;
  use Net::DNS::Nslookup;
  my $dnsname = "www.google.com";
  my @nslookup = Net::DNS::Nslookup->just_ip($dnsname);
  for (@nslookup) { print "$_\n"; }
  
  Output:
        Non-authoritative answer:
        64.233.169.103
        64.233.169.147
        64.233.169.104
        64.233.169.99
        
        
  use strict;
  use Net::DNS::Nslookup;
  my @sites = ("www.google.com","www.cnn.com","www.jobs.com");
 
  foreach my $dnsname (@sites) {
  my @nslookup = Net::DNS::Nslookup->just_ip($dnsname);
  for (@nslookup) { print "$_\n"; }
  }
  
  Output:
        Non-authoritative answer:
        64.233.169.103
        64.233.169.147
        64.233.169.104
        64.233.169.99
        Non-authoritative answer:
        64.236.29.120
        64.236.91.21
        64.236.91.22
        64.236.91.23
        Non-authoritative answer:
        204.188.136.6
        204.188.136.9

METHODS ^

just_ip()

  @nslookup = Net::DNS::Nslookup->just_ip($dnsname);

  Resolve name such as www.google.com to IP address(es). 

SYSTEM REQUIREMENTS ^

  This module requires "nslookup" binary.  

SEE ALSO ^

  man nslookup

AUTHOR ^

  Paul Grinberg, grinberg at isrcomputing.com
  http://nsvu.blogspot.com
  http://www.isrcomputing.org

COPYRIGHT ^

  Copyright (c) 2007 Paul Grinberg. All rights reserved.
  This program is free software; you can redistribute it
  and/or modify it under the same terms as Perl itself.