#!/usr/bin/perl -w

use strict;
use MARC;

my $file = shift @ARGV || die "Usage: $0 [marc file]";

my $x = new MARC;
my $nr = $x->openmarc( { file => $file, format => 'usmarc' });

print "file '$file' with '",$x->marc_count(),"' records...\n";

while ($x->nextmarc(1)) {
	print $x->output({format=>'ascii'});	# FIX

	my $rec = $x->marc_count();
	print $x->getfirstvalue({record=>$rec,field=>245,subfield=>'a',delimiter=>" "}),"<--\n";
}

