1 # $Id: zoomscan.pl,v 1.1 2007-08-15 18:36:36 mike Exp $
3 # This is the scanning counterpart to zoomscan.pl's searching
4 # perl -I../../blib/lib -I../../blib/arch zoomscan.pl <target> <scanQuery>
11 print STDERR "Usage: $0 target scanQuery\n";
12 print STDERR " eg. $0 z3950.indexdata.dk/gils computer\n";
15 my($host, $scanQuery) = @ARGV;
18 my $conn = new ZOOM::Connection($host, 0);
19 $conn->option(preferredRecordSyntax => "usmarc");
20 my $ss = $conn->scan_pqf($scanQuery);
23 my($term, $occ) = $ss->term($i);
24 print $i+1, ": $term";
25 print " ($occ)" if defined $occ;
32 die "Non-ZOOM error: $@" if !$@->isa("ZOOM::Exception");
33 print STDERR "ZOOM error $@\n";