3 # grep for expressions in various fields of the dx file
11 # initialise spots file
14 print "reading in spot data ..";
16 $count = spot->init();
18 print "done ($t secs)\n";
26 print "$count database records read in\n";
32 last if $field =~ /^q/i;
39 print "doing field $field with /$expr/\n";
52 @spots = spot->search($field, $expr);
54 foreach $ref (@spots) {
56 my $t = ztime($dx[2]);
57 my $d = cldate($dx[2]);
58 print "$dx[0] $dx[1] $d $t $dx[4] <$dx[3]>\n";
61 print "$count records found\n";
69 next if $time - $dx[2] > (84600 * 60);
70 unshift @spots, [ @dx ];
77 foreach $ref (@spots) {
78 if ($$ref[$field] =~ /$expr/i) {
80 my $t = ztime($dx[2]);
81 my $d = cldate($dx[2]);
82 print "$dx[0] $dx[1] $d $t $dx[4] <$dx[3]>\n";