From: epg <> Date: Sat, 3 Apr 2004 06:22:45 +0000 (+0000) Subject: Switch to %opts style getopts. X-Git-Url: https://diplodocus.org/git/minc/commitdiff_plain/deda52390c5219fa748a297097cf8277d0c2c12d?hp=8e196b134dec372c5739471a901e20746685b32e Switch to %opts style getopts. --- diff --git a/minc b/minc index be4f334..8187a74 100755 --- a/minc +++ b/minc @@ -79,21 +79,19 @@ my $dumpfilters = 0; 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; }