From: Shawn Boyette Date: Wed, 13 May 2009 14:48:48 +0000 (+0000) Subject: fix for undef value in regex X-Git-Url: http://git.equinoxoli.org/?p=migration-tools.git;a=commitdiff_plain;h=073fc6462a48ca38e24c28a37ead7e824c8ee980;hp=476038fc8d460b707306aa680713e11b09c691d8 fix for undef value in regex --- diff --git a/fingerprinter b/fingerprinter index 098747d..4386aee 100755 --- a/fingerprinter +++ b/fingerprinter @@ -88,7 +88,7 @@ sub populate_marc { } unless ($marc{date1} and $marc{date1} =~ /\d{4}/) { my $my_260 = $record->field('260'); - if ($my_260) { + if ($my_260 and $my_260->subfield('c')) { my $date1 = $my_260->subfield('c'); $date1 =~ s/\D//g; if (defined $date1 and $date1 =~ /\d{4}/) {