4 use MARC::File::USMARC;
7 my $file = shift @ARGV || die "Usage: $0 [marc file]";
9 my $marc_file = MARC::File::USMARC->in($file) || die $MARC::File::ERROR;
12 my $filename = shift || die;
13 my $file = MARC::File::USMARC->in($filename) || die $MARC::File::ERROR;
15 while ($file->skip()) {
21 print "file '$file' with ",marc_count($file)," records...\n";
23 while( my $marc = $marc_file->next() ) {
24 print "REC #",$marc->field('001')->as_string,": ",$marc->title,"\n";
25 print $marc->as_formatted,"\n\n";