our $run = 1;
my $printfilenames = 0;
-our $opt_d;
-our $opt_n;
-our $opt_p;
+my %opts;
-if (not getopts('dnp')) {
+if (not getopts('dnp', \%opts)) {
exit(2);
}
-if ($opt_d) {
+if ($opts{'d'}) {
$dumpfilters = 1;
-} elsif ($opt_n) {
+} elsif ($opts{'n'}) {
$run = 0;
}
-if ($opt_p) {
+if ($opts{'p'}) {
$printfilenames = 1;
}