From 4b9ee7a2265d1c7e9478f609e7715f1d49077350 Mon Sep 17 00:00:00 2001 From: Shawn Boyette Date: Tue, 6 Jan 2009 21:48:45 +0000 Subject: [PATCH] tweaks --- marc_cleanup | 14 +++++++------- 1 files changed, 7 insertions(+), 7 deletions(-) diff --git a/marc_cleanup b/marc_cleanup index e717967..7d09f27 100755 --- a/marc_cleanup +++ b/marc_cleanup @@ -1,4 +1,5 @@ #!/usr/bin/perl +require 5.10.0; use strict; use warnings; @@ -174,7 +175,7 @@ sub do_automated_cleanups { # automatable subfield maladies $record[$ptr] =~ s/code=" ">c/code="c">/; - $record[$ptr] =~ s/code=" ">\$/code="c">$/; + $record[$ptr] =~ s/code=" ">\$/code="c">\$/; } } @@ -669,10 +670,9 @@ sub initialize { show_trashhelp() if ($c->{trashhelp}); # defaults - if ($c->{prefix}) { - $c->{output} = join('.',$c->{prefix},'clean','marc','xml'); - $c->{exception} = join('.',$c->{prefix},'marc','ex'); - } + my $pfx = $c->{prefix} // "bibs"; + $c->{output} = join('.',$c->{prefix},'clean','marc','xml'); + $c->{exception} = join('.',$c->{prefix},'exception','marc','xml'); $c->{'renumber-tag'} = 903 unless defined $c->{'renumber-tag'}; $c->{'renumber-subfield'} = 'a' unless defined $c->{'renumber-subfield'}; $c->{window} = 5; @@ -694,8 +694,8 @@ Options --output -o Cleaned MARCXML output filename --exception -x Exception (dumped records) MARCXML filename or - --prefix=> -p Shared prefix for output/exception files. Will - produce PREFIX.clean.marc.xml and PREFIX.ex.xml + --prefix=> -p Shared prefix for output/exception files. Will produce + PREFIX.clean.marc.xml and PREFIX.exception.marc.xml --renumber-from -rf Begin renumbering id sequence with this number --renumber-tag -rt Tag to use in renumbering (default: 903) -- 1.7.2.5