remove $Id$ strings from everywhere that I can find
[spider.git] / cmd / show / usdb.pl
1 #
2 # show the usdb info for each callsign or prefix entered
3 #
4 #
5 #
6 # Copyright (c) 2002 Dirk Koopman G1TLH
7 #
8
9 my ($self, $line) = @_;
10 my @list = split /\s+/, $line;  # generate a list of callsigns
11
12 my $l;
13 my @out;
14
15 return (1, $self->msg('db3', 'FCC USDB')) unless $USDB::present;
16                 
17 #print "line: $line\n";
18 foreach $l (@list) {
19     $l = uc $l;
20         my ($city, $state) = USDB::get($l);
21         if ($state) {
22                 push @out, sprintf "%-7s -> %s, %s", $l, 
23                         join (' ', map {ucfirst} split(/\s+/, lc $city)), $state;
24         } else {
25                 push @out, sprintf "%-7s -> Not Found", $l;
26         }
27 }
28
29 return (1, @out);