MARC::Record version 0.08 ========================= SYNOPSIS The MARC::Record and MARC::Field modules allow a simple, object-based interface to MARC records. For example, the following program reads through a USMARC file and prints the title, followed by any/all subject tags. #!/usr/bin/perl -w use strict; use MARC::Record; use MARC::Record; open( IN, "<", $filename ) or die "Couldn't open $filename: $!\n"; binmode( IN ); # for the Windows folks while ( !eof(IN) ) { my $marc = MARC::Record::next_from_file( *IN ); die $MARC::Record::ERROR unless $marc; # Print the title tag print $marc->subfield(245,"a"), "\n"; # Find any subject tags and print their _a subfields for my $subject ( $marc->field( "6XX" ) ) { print "\t", $subject->tag, ": ", $subject->subfield("a"), "\n"; } # for subject } # while close IN or die "Error closing $filename: $!\n"; INSTALLATION To install this module type the following: perl Makefile.PL make make test make install DEPENDENCIES MARC::Record and Marc::Field require nothing more than Perl 5.6.0. COPYRIGHT AND LICENCE This software is free software and may be distributed under the same terms as Perl itself. Copyright (C) 2001 Andy Lester