[svn r5737] Modified command line parsing so arguments commute.

This commit is contained in:
dl267 2004-04-18 20:57:30 +02:00
parent d0ffd2d8ef
commit 6fecb78c29

View File

@ -1,5 +1,6 @@
#!/usr/bin/perl -w
use strict;
use Getopt::Long;
# no file made for 1996-01 (e.g.) Fix it.
# 136 ents are in 161. why?
@ -7,6 +8,14 @@ use strict;
((my $progname = $0) =~ s/^.*(\/|\\)//ig); # basename $0
my $no_verbose_progress = 0;
#if ($ARGV[1]) {
# if ($ARGV[1] eq "-q") {
# $verbose_progress = undef;
# }
#}
GetOptions(q => \$no_verbose_progress);
unless ($ARGV[0]) {
print "Specify a CSV file name as the first argument (e.g. CAVETAB2.CSV)\n";
die $!;
@ -14,12 +23,6 @@ unless ($ARGV[0]) {
open (CSV, "< $ARGV[0]");
my $verbose_progress = 1;
if ($ARGV[1]) {
if ($ARGV[1] eq "-q") {
$verbose_progress = undef;
}
}
# Start writing index file
open IDXALL, ">..\/indxal.htm" or die $!;
@ -174,7 +177,7 @@ sub do_this_line {
return;
}
if ($verbose_progress) {
unless ($no_verbose_progress) {
print "Progress: $file\n";
}