Most MARC utilities like MARC::Record depend upon the actual directory lengths
and having well formed structure. Isn't that what standards are for? But
sometimes you really do get badly formed MARC records and need to recover the
data. The presented code does have two caveats, which I point
I wondered if any of you had run into similar problems, or if you had
any thoughts on how to tackle this particular issue.
It's ironic that MARC::Record *used* to do what Andrew suggests: using
split() rather than
than substr() with the actual directory lengths. The reason for the
switch was jus
It's amazing when you read your own response, after send it, you discover
mistakes... OK here is an addendum to what I said below:
You will probably need this line at the beginning:
use Carp;
The croaking should be:
or croak("Cannot open input file $FileMARC21\n");
To avoid reusi
MARC records contain a field delimiter after each field and a record delimiter
at the end. Assuming that those delimiters are still in your MARC records and
that the directory entries are in the same order as the fields, then you can do
the following:
1 Set Perl's record delimiter to the MAR
I have been having some problems with a client's catalogue that contains
quite a few corrupt MARC records. These are for the most part records that
have been kicking around since as long ago as 1965, and that have been
transferred between various systems and converted between different formats