No need to use MARC::Batch in this case, just use the new_from_usmarc method in 

my $record = MARC::Record->new_from_usmarc( $record_string ) ;

Jon Gorman
University of Illinois

> -----Original Message-----
> From: []
> Sent: Thursday, August 02, 2012 12:17 PM
> To:
> Subject: Turning string into MARC record
> This seems like such a stupid question - I've used MARC::Batch for years - but
> how do you turn a MARC record string into a MARC::Record object?
> I've always started with a file of MARC records and cycle through them with
> MARC::Batch. Now I have a single MARC record in a string - no file, it's
> retrieved by Z39.50. I could have sworn I've done this before but I can't find
> anything in the documentation. Do I have to somehow assign it to a file
> handle à la "open (MARC, '<', \$rawmarc);" and pass that it in to
> MARC::Batch? I'm willing to do that but I really could swear there was a
> simpler way to do it, avoiding MARC::Batch altogether.
> Arvin

Reply via email to