- $fh->open(">$fn") or die "Can't open $fn ($!)";
-
- # prefix location data
- $fh->print("%prefix_loc = (\n");
- foreach $l (sort {$a <=> $b} keys %prefix_loc) {
- my $r = $prefix_loc{$l};
- $fh->printf(" $l => bless( { name => '%s', dxcc => %d, itu => %d, utcoff => %d, lat => %f, long => %f }, 'Prefix'),\n",
- $r->{name}, $r->{dxcc}, $r->{itu}, $r->{cq}, $r->{utcoff}, $r->{lat}, $r->{long});
- }
- $fh->print(");\n\n");
-
- # prefix data
- $fh->print("%pre = (\n");
- foreach $k (sort keys %pre) {
- $fh->print(" '$k' => [");
- my @list = @{$pre{$k}};
- my $l;
- my $str;
- foreach $l (@list) {
- $str .= " $l,";
- }
- chop $str;
- $fh->print("$str ],\n");
- }
- $fh->print(");\n");
- $fh->close;
+ $fh->open(">$fn") or die "Can't open $fn ($!)";
+
+ # prefix location data
+ $fh->print("%prefix_loc = (\n");
+ foreach $l (sort {$a <=> $b} keys %prefix_loc) {
+ my $r = $prefix_loc{$l};
+ $fh->printf(" $l => bless( { name => '%s', dxcc => %d, itu => %d, utcoff => %d, lat => %f, long => %f }, 'Prefix'),\n",
+ $r->{name}, $r->{dxcc}, $r->{itu}, $r->{cq}, $r->{utcoff}, $r->{lat}, $r->{long});
+ }
+ $fh->print(");\n\n");
+
+ # prefix data
+ $fh->print("%pre = (\n");
+ foreach $k (sort keys %pre) {
+ $fh->print(" '$k' => [");
+ my @list = @{$pre{$k}};
+ my $l;
+ my $str;
+ foreach $l (@list) {
+ $str .= " $l,";
+ }
+ chop $str;
+ $fh->print("$str ],\n");
+ }
+ $fh->print(");\n");
+ undef $fh;
+ untie %pre;