RE: Turning string into MARC record
[email protected] ("Gorman, Jon") Thu, 2 Aug 2012 17:20:06 +0000
| Newsgroups | perl.perl4lib |
|---|---|
| Message-ID | <5CB9BCB25D39DB468750CD8487509ED3216ED853@CITESMBX5.ad.uillinois.edu> |
No need to use MARC::Batch in this case, just use the new_from_usmarc method in MARC::Record my $record = MARC::Record->new_from_usmarc( $record_string ) ; Jon Gorman University of Illinois > -----Original Message----- > From: [email protected] [mailto:[email protected]] > Sent: Thursday, August 02, 2012 12:17 PM > To: [email protected] > 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