NAME
Net::Whois - Get and parse "whois" data from InterNIC
SYNOPSIS
my $w = new Net::Whois::Domain $dom
or die "Can't find info on $dom\n";
#
# Note that all fields except "name" and "tag" may be undef
# because "whois" information is erratically filled in.
#
print "Domain: ", $w->domain, "\n";
print "Name: ", $w->name, "\n";
print "Tag: ", $w->tag, "\n";
print "Address:\n", map { " $_\n" } $w->address;
print "Country: ", $w->country, "\n";
print "Servers:\n", map { " $$_[0] ($$_[1])\n" } @{$w->servers};
my ($c, $t);
if ($c = $w->contacts) {
print "Contacts:\n";
for $t (sort keys %$c) {
print " $t:\n";
print map { "\t$_\n" } @{$$c{$t}};
}
}
$cur_server = Net::Whois::server;
Net::Whois::server 'new.whois.server'; # optional
DESCRIPTION
Net::Whois::Domain new() attempts to retrieve and parse the given domain's "whois" information from the InterNIC. If the constructor returns a reference, that reference can be used to access the various attributes of the domains' whois entry.
Note that the Locale::Country module (part of the Locale-Codes distribution) is used to recognize spelled-out country names; if that module is not present, only two-letter country abbreviations will be recognized.
The server consulted is "whois.internic.net", unless this is changed by a call to Net::Whois::server().
AUTHOR
Originally written by Chip Salzenberg in April of 1997 for Idle Communications, Inc.
COPYRIGHT
This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself.