From 53bae2019fb3d3a209e68b6283a9b05cb58d9a80 Mon Sep 17 00:00:00 2001 From: hjp Date: Wed, 14 Aug 2002 18:44:08 +0000 Subject: [PATCH] Added usage message. --- dns/axfr.pl | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/dns/axfr.pl b/dns/axfr.pl index 5f8cfc4..432866c 100755 --- a/dns/axfr.pl +++ b/dns/axfr.pl @@ -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]);