-$ifn = "$prefix/wpxloc.raw" if !$ifn;
-open (IN, $ifn) or die "can't open $ifn ($!)";
+$ifn = $system ? "$main::data/wpxloc.raw" : "$prefix/wpxloc.raw";
+unless (open (IN, $ifn)) {
+ $ifn = "$main::data/wpxloc.raw";
+ open(IN, $ifn) or die "can't open $ifn ($!)";
+}
#print Data::Dumper->Dump([\%pre, \%locn], [qw(pre locn)]);
# now open the cty.dat file if it is there
#print Data::Dumper->Dump([\%pre, \%locn], [qw(pre locn)]);
# now open the cty.dat file if it is there
print OUT " name => '$name',";
print OUT " dxcc => $dxcc,";
print OUT " itu => $itu,";
print OUT " cq => $cq,";
print OUT " utcoff => $utcoff,";
print OUT " lat => $latd,";
print OUT " name => '$name',";
print OUT " dxcc => $dxcc,";
print OUT " itu => $itu,";
print OUT " cq => $cq,";
print OUT " utcoff => $utcoff,";
print OUT " lat => $latd,";