Added usage message.

This commit is contained in:
hjp 2002-08-14 18:44:08 +00:00
parent 1b2cac4a52
commit 53bae2019f
1 changed files with 7 additions and 0 deletions

View File

@ -2,6 +2,13 @@
use strict;
use Net::DNS;
sub usage {
print STDERR "Usage: $0 zone nameserver\n" unless (@ARGV == 2);
exit(1);
}
usage() unless (@ARGV == 2);
my $res = new Net::DNS::Resolver;
$res->nameservers($ARGV[1]);
my @zone = $res->axfr($ARGV[0]);