-
-
Save ranginui/926693 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
my @subfieldlist; | |
SUBS: | |
for my $sub ($tag->{subfield}){ | |
my %rec; | |
$rec{$sub->{code}} = $sub->{content}; | |
push @subfieldlist,%rec; | |
} | |
my $tagnum = sprintf "%03d",$tag->{number}; | |
my $field = MARC::Field->new($tagnum, | |
$tag->{indicator1}, | |
$tag->{indicator2}, | |
@subfieldlist); | |
Dumper($tag) returns: | |
$VAR1 = { | |
'tagID' => '3', | |
'number' => 10, | |
'subfield' => { | |
'content' => ' 92034200 //r932', | |
'code' => 'a' | |
}, | |
'indicator2' => ' ', | |
'indicator1' => ' ' | |
}; | |
Right before the MARC::Field->new call, Dumper(@subfieldlist) returns: | |
$VAR1 = { | |
'a' => ' 92034200 //r932' | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment