/[webpac]/branches/drustvene/tools/dump_marc.pl
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /branches/drustvene/tools/dump_marc.pl

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 606 by dpavlin, Mon Dec 27 21:00:20 2004 UTC revision 607 by dpavlin, Tue Dec 28 04:11:47 2004 UTC
# Line 2  Line 2 
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    
# Line 19  sub marc_count { Line 20  sub marc_count {
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    

Legend:
Removed from v.606  
changed lines
  Added in v.607

  ViewVC Help
Powered by ViewVC 1.1.26