turns out the inds in empty datafields won't ALWAYS be spaces
[migration-tools.git] / yaz-cleanup
index 9942994..fc08740 100755 (executable)
@@ -6,9 +6,9 @@ open NUMARC, '>', 'incoming.clean.marc.xml';
 $line1 = <MARC>;
 
 while ($line2 = <MARC>) {
-    if ($line1 =~ m/<datafield tag="..." ind1=" " ind2=" ">/) {
+    if ($line1 =~ m/<datafield tag="..." ind1="." ind2=".">/) {
         if ($line2 =~ m|</datafield>|) {
-            $line1 = <MARC>>;
+            $line1 = <MARC>;
             next;
         }
     }