- # compare dates to see whether need to open another save file (remember, redefining $fp
- # automagically closes the output file (if any))
- my @date = Julian::unixtoj($spot[2]);
- $fp = Spot->open(@date, ">>") if (!$fp || Julian::cmp(@date, $fp->{year}, $fp->{day}));
+ # remove ssid if present on spotter
+ $spot[4] =~ s/-\d+$//o;
+
+ # add the 'dxcc' country on the end
+ my @dxcc = Prefix::extract($spot[1]);
+ push @spot, (@dxcc > 0 ) ? $dxcc[1]->dxcc() : 0;
+
+ my $buf = join("\^", @spot);