2 |
|
|
3 |
use strict; |
use strict; |
4 |
use MARC::File::USMARC; |
use MARC::File::USMARC; |
5 |
|
use Data::Dumper; |
6 |
|
|
7 |
my $file = shift @ARGV || die "Usage: $0 [marc file]"; |
my $file = shift @ARGV || die "Usage: $0 [marc file]"; |
8 |
|
|
20 |
|
|
21 |
print "file '$file' with ",marc_count($file)," records...\n"; |
print "file '$file' with ",marc_count($file)," records...\n"; |
22 |
|
|
|
my $i = 1; |
|
23 |
while( my $marc = $marc_file->next() ) { |
while( my $marc = $marc_file->next() ) { |
24 |
print "REC #",$i++,": ",$marc->title,"\n"; |
print "REC #",$marc->field('001')->as_string,": ",$marc->title,"\n"; |
25 |
print $marc->as_formatted,"\n\n"; |
print $marc->as_formatted,"\n\n"; |
26 |
} |
} |
27 |
|
|