-#!/usr/bin/perl
+#!/usr/bin/env perl
#
# Implement a 'GO' database list
#
# Copyright (c) 2003 Dirk Koopman G1TLH
#
-# $Id$
+#
#
# search local then perl directories
use strict;
use IO::File;
-use DXVars;
+use SysVar;
use DXUtil;
use Spot;
use QSL;
$end = 0;
$SIG{TERM} = $SIG{INT} = sub { $end++ };
-my $qslfn = "qsl";
+my $qslfn = "dxqsl";
$main::systime = time;
-unlink "$root/data/qsl.v1";
-
+QSL::remove_files();
QSL::init(1) or die "cannot open QSL file";
-my $base = "$root/data/spots";
+my $base = localdata("spots");
opendir YEAR, $base or die "$base $!";
foreach my $year (sort readdir YEAR) {
my $f = new IO::File $fn or die "$fn ($!)";
print "doing: $fn\n";
while (<$f>) {
+ last if $end;
if (/(QSL|VIA)/i) {
my ($freq, $call, $t, $comment, $by, @rest) = split /\^/;
my $q = QSL::get($call) || new QSL $call;
}
}
$f->close;
+ last if $end;
}
+ last if $end;
}
QSL::finish();