fix bug introduced in r739
[migration-tools.git] / marc_cleanup
index 04b9760..f978ef3 100755 (executable)
@@ -186,7 +186,7 @@ sub do_automated_cleanups {
 sub stow_record_data {
     # get tag data if we're looking at it
     my $tag = 0;
-    if ($record[$ptr] =~ m/<(control|data)field tag="(.{3})"/) {
+    if ($record[$ptr] =~ m/<(?:control|data)field tag="(.{3})"/) {
         $recmeta{tag} = $1;
         $tag = $recmeta{tag};
         $record[$ptr] =~ m/ind1="(.)"/;
@@ -603,7 +603,7 @@ sub initialize {
     show_trashhelp() if ($c->{trashhelp});
 
     # defaults
-    my $pfx = $c->{prefix} // "bibs";
+    my $pfx = defined($c->{prefix}) ? $c->{prefix} : "bibs";
     $c->{ricount} = 0;
     $c->{rocount} = 0;
     $c->{'renumber-tag'} = 903 unless defined $c->{'renumber-tag'};