From: Shawn Boyette Date: Sat, 4 Oct 2008 21:29:37 +0000 (+0000) Subject: trash exclusion work X-Git-Url: http://git.equinoxoli.org/?p=migration-tools.git;a=commitdiff_plain;h=60be0a08d30266bc2e99442a609efa3260592005 trash exclusion work --- diff --git a/marc-cleanup b/marc-cleanup index 16f7b4f..40faecb 100755 --- a/marc-cleanup +++ b/marc-cleanup @@ -63,6 +63,8 @@ while (my $line = getline()) { } update_linecontext(); + next if ($line =~ m||); + # catch empty datafield elements if ($line =~ m||) { if ($record[-2] =~ m//) { @@ -196,6 +198,27 @@ sub write_record { $oreccount++ if ($FH eq $NUMARC); print $FH '\n" if(defined $recmeta{explanation}); + + # LOOP OVER %trash KEYS GOES HERE TO EXCISE UNWANTED TAGS1 + if (keys %trash) { + my @trimmed = (); + my $istrash = 0; + for my $line (@record) { + if ($istrash) { + $istrash = 0 if $line =~ m|