binmode(STDOUT, ':utf8');
binmode(STDIN, ':utf8');
+my $M;
+
foreach $argnum ( 0 .. $#ARGV ) {
print STDERR "Processing " . $ARGV[$argnum] . "\n";
- my $batch = MARC::Batch->new('XML',$ARGV[$argnum]);
+ open $M, '<:utf8', $ARGV[$argnum];
+
+ my $batch = MARC::Batch->new('XML',$M);
$batch->strict_off();
$batch->warnings_off();
print STDERR "WARNINGS: Record $count : " . join(":",@warnings) . " : continuing...\n" if ( @warnings );
+ unless ($count % 1000) {
+ print STDERR "$count\r"
+ }
+
}
};
print STDERR "Processed $count records. Last successful record = " . $last_successful_record . "\n";