11 getopts('dn:', \%opt);
13 my $file = shift @ARGV || die "usage: $0 [-n number] [-d] file.marc\n";
15 my $marc = new MARC::Fast(
20 print STDERR "$file has ",$marc->count," records...\n";
23 my $max = $marc->count;
25 if (my $mfn = $opt{'n'}) {
29 print STDERR "Dumping $min - $max\n" if ($opt{'d'});
31 for my $mfn ($min .. $max) {
32 my $rec = $marc->fetch($mfn) || next;
34 foreach my $f (sort keys %{$rec}) {
35 print "$f\t",$rec->{$f},"\n";