3 use Time::HiRes qw/time/;
5 use MARC::File::XML ( BinaryEncoding => 'utf-8' );
13 if (! ($tag && $subfield && $idfile && $marcfile && $found ) ) {
14 print "filter1per.pl <tag> <subfield> <idfile> <marcfile> <output.found> [<output.notfound>]\n";
29 open $M, '<:utf8', $marcfile;
30 open $I, '>:utf8', $found;
31 if ($notfound) { open $S, '>:utf8', $notfound; }
39 /tag="$tag" ind1=" " ind2=" ">.*?<subfield code="$subfield">(\d+)</;
51 unless ($count && $count % 100) {
52 print STDERR "\r$count\t(notfoundd: $scount, found: $icount)\t". $count / (time - $starttime);