X-Git-Url: http://dxcluster.net/gitweb/gitweb.cgi?a=blobdiff_plain;f=cmd%2Fshow%2Fheading.pl;fp=cmd%2Fshow%2Fheading.pl;h=9273243504e0a7b6c73b782f68addfae4546c004;hb=bdfc958f3d0fa912d20a020ac1a6cd2c79a22729;hp=0000000000000000000000000000000000000000;hpb=65744dd1e30165cd280502ee1a05c0c640023303;p=spider.git diff --git a/cmd/show/heading.pl b/cmd/show/heading.pl new file mode 100644 index 00000000..92732435 --- /dev/null +++ b/cmd/show/heading.pl @@ -0,0 +1,25 @@ +# +# show the dxcc number for each callsign or prefix entered +# +# $Id$ +# + +my ($self, $line) = @_; +my @list = split /\s+/, $line; # generate a list of callsigns + +my $l; +my @out; + +print "line: $line\n"; +foreach $l (@list) { + my @ans = Prefix::extract($l); + print "ans:", @ans, "\n"; + next if !@ans; + my $pre = shift @ans; + my $a; + foreach $a (@ans) { + push @out, sprintf "%s DXCC: %3d ITU: %3d CQ: %3d (%s, %s)", uc $l, $a->dxcc(), $a->itu(), $a->cq(), $pre, $a->name(); + } +} + +return (1, @out);