use Net::DLookup;
# Initialize Net::DLookup object
my $dlu = Net::DLookup -> new;
# Replace domain definitions from a file
$dlu -> LoadTLD($file, 1);
# Add domain definitions from a file
$dlu -> LoadTLD($file, 0);
# Check domain name validity and assign it to the object
@errors = $dlu -> IsValid($domain);
# Return availability
@response = $dlu -> DoWhois(0);
# Return availability and registrar information
@response = $dlu -> DoWhois(1);