a little sample script that dump a iso2709 file. call it with :
[koha.git] / misc / dumpmarc.pl
1 #!/usr/bin/perl
2 # small script that dumps an iso2709 file.
3
4 use strict;
5
6 # Koha modules used
7 use MARC::File::USMARC;
8 use MARC::Record;
9 use MARC::Batch;
10
11 use Getopt::Long;
12 my ( $input_marc_file);
13 GetOptions(
14     'file:s'    => \$input_marc_file
15 );
16
17 my $batch = MARC::Batch->new( 'USMARC', $input_marc_file );
18 $batch->warnings_off();
19 $batch->strict_off();
20
21 while ( my $record = $batch->next() ) {
22         print $record->as_formatted();
23 }