Parent Directory | Revision Log
unsorted perl tools and snippets
1 | dpavlin | 61 | #!/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 |
Name | Value |
---|---|
cvs2svn:cvs-rev | 1.1 |
svn:executable | * |
ViewVC Help | |
Powered by ViewVC 1.1.26 |