/[webpac]/trunk/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

Contents of /trunk/tools/dump_marc.pl

Parent Directory Parent Directory | Revision Log Revision Log


Revision 61 - (show annotations)
Fri Jul 4 19:37:32 2003 UTC (16 years, 5 months ago) by dpavlin
File MIME type: text/plain
File size: 438 byte(s)
unsorted perl tools and snippets

1 #!/usr/bin/perl -w
2
3 use strict;
4 use MARC;
5
6 my $file = shift @ARGV || die "Usage: $0 [marc file]";
7
8 my $x = new MARC;
9 my $nr = $x->openmarc( { file => $file, format => 'usmarc' });
10
11 print "file '$file' with '",$x->marc_count(),"' records...\n";
12
13 while ($x->nextmarc(1)) {
14 print $x->output({format=>'ascii'}); # FIX
15
16 my $rec = $x->marc_count();
17 print $x->getfirstvalue({record=>$rec,field=>245,subfield=>'a',delimiter=>" "}),"<--\n";
18 }
19

Properties

Name Value
cvs2svn:cvs-rev 1.1
svn:executable *

  ViewVC Help
Powered by ViewVC 1.1.26