more \Q...\E wrapping on regexes, to handle occassionally problematic strings.
authorMason James <mtj@liblime.com>
Tue, 26 Feb 2008 23:34:01 +0000 (12:34 +1300)
committerJoshua Ferraro <jmf@liblime.com>
Thu, 28 Feb 2008 13:58:45 +0000 (07:58 -0600)
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
misc/migration_tools/rebuild_nozebra.pl

index ab64d54..ec71137 100755 (executable)
@@ -133,7 +133,7 @@ while (my ($biblionumber) = $sth->fetchrow) {
             # check each index to see if the subfield is stored somewhere
             # otherwise, store it in __RAW__ index
             foreach my $key (keys %index) {
-                if ($index{$key} =~ /$tag\*/ or $index{$key} =~ /$tag$subfieldcode/) {
+                if ($index{$key} =~ /\Q$tag\E\*/ or $index{$key} =~ /\Q$tag$subfieldcode\E/) {
                     $indexed=1;
                     my $line= lc $subfield->[1];
                     # remove meaningless value in the field...