Merge branch 'master' of git.esilibrary.com:migration-tools
[migration-tools.git] / extract_loadset
index aa29023..61326bd 100755 (executable)
@@ -41,6 +41,7 @@ open MI, '<', $conf->{input} or die "Can't open input file: $!\n";
 open MO, '>', $conf->{output} or die "Can't open output file: $!\n";
 while (<MI>) {
     m/tag="$conf->{tag}".+?<subfield code="$conf->{subfield}">(\d+)</;
+    next unless defined $1;
     if ($conf->{reverse}) {
         print MO if     $exclude{$1};
     } else {