$fate->update($data);
}
+# Cleanup ISBNs that had silly leading spaces prepended
+my @isbntags = $record->field('020');
+foreach my $isbntag (@isbntags) {
+ my $rawisbn = $isbntag->subfield('a');
+ next unless $rawisbn;
+ $rawisbn =~ s{^\s*(\S+)\s*$}{$1};
+ my ($isbn, $rest) = split(/ /, $rawisbn, 2);
+ if ($rawisbn ne $isbn) {
+ $isbntag->update('a', $isbn);
+ }
+ if ($rest and $isbntag->subfield('q') ne $rest) {
+ $isbntag->update('q', $rest);
+ }
+}
+
# Add explicit publisher relator code
my @added = $record->field('710');
foreach my $entry (@added) {