From 60be0a08d30266bc2e99442a609efa3260592005 Mon Sep 17 00:00:00 2001 From: Shawn Boyette Date: Sat, 4 Oct 2008 21:29:37 +0000 Subject: [PATCH] trash exclusion work --- marc-cleanup | 23 +++++++++++++++++++++++ 1 files changed, 23 insertions(+), 0 deletions(-) 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|