2 # test for independent sql servers
3 # search local then perl directories
8 # root of directory tree for this system
10 $root = $ENV{'DXSPIDER_ROOT'} if $ENV{'DXSPIDER_ROOT'};
12 unshift @INC, "$root/perl"; # this IS the right way round!
13 unshift @INC, "$root/local";
20 print "usage:\tdbquery.pl <words>\n\teg: dbquery.pl rtty lebanon\n\n" unless @ARGV;
22 my $width = $ENV{'COLUMNS'} || $ENV{'COLS'} || 80;
23 my $dx = ARRL::DX->new();
24 my @out = $dx->query(q=>join(' ', @ARGV));
26 foreach my $ref (@out) {
27 my $s = cldate($ref->[1]);
28 for (split /\s+/, "$ref->[0] [$ref->[2]]") {
29 if (length($s) + length($_) + 1 < $width ) {
30 $s .= ' ' if length $s;
37 print "$s\n" if length $s;