From ecd9a840150d8aac37606594e9abaf0ce4838dfb Mon Sep 17 00:00:00 2001 From: Ben Ostrowsky Date: Fri, 20 May 2011 16:13:09 +0000 Subject: [PATCH 1/1] Rewrote some regular expressions to make them compatible with Perl versions before 5.10 --- marc_cleanup | 12 ++++++------ 1 files changed, 6 insertions(+), 6 deletions(-) diff --git a/marc_cleanup b/marc_cleanup index 89f8ab0..f0c3753 100755 --- a/marc_cleanup +++ b/marc_cleanup @@ -186,13 +186,13 @@ sub do_automated_cleanups { sub stow_record_data { # get tag data if we're looking at it my $tag = 0; - if ($record[$ptr] =~ m/<(control|data)field tag="(?.{3})"/) { - $recmeta{tag} = $+{TAG}; + if ($record[$ptr] =~ m/<(control|data)field tag="(.{3})"/) { + $recmeta{tag} = $1; $tag = $recmeta{tag}; - $record[$ptr] =~ m/ind1="(?.)"/; - $recmeta{ind1} = $+{IND1} || ''; - $record[$ptr] =~ m/ind2="(?.)"/; - $recmeta{ind2} = $+{IND2} || ''; + $record[$ptr] =~ m/ind1="(.)"/; + $recmeta{ind1} = $1 || ''; + $record[$ptr] =~ m/ind2="(.)"/; + $recmeta{ind2} = $1 || ''; unless ($tag) { message("Autokill record: no detectable tag"); -- 1.7.2.5