2 # small script that dumps an iso2709 file.
8 use MARC::File::USMARC;
13 my ( $input_marc_file,$number) = ('',0);
16 'file:s' => \$input_marc_file,
21 warn "NUM : $number\n";
22 if ($version || ($input_marc_file eq '')) {
24 small script to dump an iso2709 file.
26 \tv : this version/help screen
27 \tfile /path/to/file/to/dump : the file to dump
28 \tn : the number of the record to dump. If missing, all the file is dumped
29 SAMPLE : ./dumpmarc.pl -file /home/paul/koha.dev/local/npl -n 1
35 my $batch = MARC::Batch->new( 'USMARC', $input_marc_file );
36 $batch->warnings_off();
39 while ( my $record = $batch->next() ) {
40 print "\nNUMBER $i =>\n".$record->as_formatted() if ($i eq $number || $number eq 0);
43 print "\n==================\n$i record parsed\n";