/[MARC-Fast]/trunk/scripts/dump_fastmarc.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

Annotation of /trunk/scripts/dump_fastmarc.pl

Parent Directory Parent Directory | Revision Log Revision Log


Revision 3 - (hide annotations)
Fri Apr 8 12:19:24 2005 UTC (19 years, 1 month ago) by dpavlin
File MIME type: text/plain
File size: 467 byte(s)
dump sorted fields

1 dpavlin 1 #!/usr/bin/perl -w
2    
3     use strict;
4     use blib;
5    
6     use MARC::Fast;
7    
8     use Data::Dumper;
9    
10     my $file = shift @ARGV || die "usage: $0 file.marc\n";
11     my $debug = shift @ARGV;
12    
13     my $marc = new MARC::Fast(
14     marcdb => $file,
15     debug => $debug,
16     );
17    
18     print STDERR "$file has ",$marc->count," records...\n\n";
19    
20     for my $mfn (1 .. $marc->count) {
21     my $rec = $marc->fetch($mfn) || next;
22     print "REC $mfn\n";
23 dpavlin 3 foreach my $f (sort keys %{$rec}) {
24 dpavlin 1 print "$f\t",$rec->{$f},"\n";
25     }
26     print "\n";
27     }

Properties

Name Value
svn:executable

  ViewVC Help
Powered by ViewVC 1.1.26