Fixing up a regexp to stop a trivial warn
authorChris Nighswonger <cnighswonger@foundations.edu>
Thu, 4 Nov 2010 18:14:10 +0000 (14:14 -0400)
committerChris Nighswonger <cnighswonger@foundations.edu>
Thu, 4 Nov 2010 18:24:46 +0000 (14:24 -0400)
misc/migration_tools/bulkmarcimport.pl

index 2f18d52..3bb9ed8 100755 (executable)
@@ -206,9 +206,10 @@ RECORD: while (  ) {
             }
         } else {
             if (my $f020 = $record->field('020')) {
-                $isbn = $f020->subfield('a');
-                $isbn =~ s/-//g;
-                $f020->update('a' => $isbn);
+                if ($isbn = $f020->subfield('a')) {
+                    $isbn =~ s/-//g;
+                    $f020->update('a' => $isbn);
+                }
             }
         }
     }