Skip to content

Commit

Permalink
Adding example how to remove non-numeric fields #84
Browse files Browse the repository at this point in the history
  • Loading branch information
phochste committed Jun 21, 2018
1 parent 77d75f6 commit 537d5ab
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions lib/Catmandu/MARC/Tutorial.pod
Original file line number Diff line number Diff line change
Expand Up @@ -451,6 +451,17 @@ We will use the L<Catmandu::Fix::Bind::marc_each> bind with a loop variable:
end
end

=head2 Remove all non-numeric fields from the MARC record

# For each marc field...
do marc_each(var:this)
# If we have a non-numeric fields
unless all_match(this.tag,"\d{3}")
# Remove this tag
marc_remove(***)
end
end

=head1 WRITING

=head2 Convert a MARC record into a MARC record (do nothing)
Expand Down

0 comments on commit 537d5ab

Please sign in to comment.