added the state filtering stuff
[spider.git] / cmd / show / prefix.pl
index 200a4f1ee5331f98d547b49c3acab674a99b19cc..df0f192c451632807d5bbbcb9ef7612ea2f3e40a 100644 (file)
@@ -20,6 +20,9 @@ foreach $l (@list) {
                push @out, sprintf "%s DXCC: %d ITU: %d CQ: %d LL: %s %s (%s, %s)", uc $l, $a->dxcc, $a->itu, $a->cq, slat($a->lat), slong($a->long), $pre, $a->name;
                $l = " " x length $l;
        }
+       if ($ans[0]->state) {
+               push @out, sprintf "%s City: %s State: %s", $l, join (' ', map {ucfirst} split(/\s+/, lc $ans[0]->city)), $ans[0]->state;
+       }
 }
 
 return (1, @out);