Catmandu-MARC
view release on metacpan or search on metacpan
lib/Catmandu/Importer/MARC/Line.pm view on Meta::CPAN
if ($sf) {
# get subfield codes by pattern
# some special characters are allowed as subfiled codes in local defined field
# see https://www.loc.gov/marc/96principl.html#eight 8.4.2.3.
my @sf_codes = $sf =~ m/\s?\$([a-z0-9!"#\$%&'\(\)\*\+'-\.\/:;<=>])\s/g;
# split string by subfield code pattern
my @sf_values
= grep {length $_}
split
/\s?\$[a-z0-9!"#\$%&'\(\)\*\+'-\.\/:;<=>]\s/,
$sf;
if (scalar @sf_codes != scalar @sf_values) {
warn
'different number of subfield codes and values';
next;
}
push @record,
[
( run in 0.377 second using v1.01-cache-2.11-cpan-cc502c75498 )