X-Git-Url: http://git.equinoxoli.org/?p=migration-tools.git;a=blobdiff_plain;f=extract_loadset;h=61326bdd0c575e3dfd069b18139926353c63aa8b;hp=07d3a3ab280b86ae07c8219b1ec9e6f80415a03c;hb=fd758a41b0caf955c76cbb2649e95a65bcffb2a8;hpb=d10d13ffea1f2d6faeaaab789ebb1e690611d3d4 diff --git a/extract_loadset b/extract_loadset index 07d3a3a..61326bd 100755 --- a/extract_loadset +++ b/extract_loadset @@ -32,11 +32,7 @@ while () { chomp; my ($lead,$sub) = split /\t/; $sub =~ s/\s//g; # any whitespace is extraneous - if ($conf->{reverse}) { - $exclude{$lead} = 1 unless ($lead < $conf->{lowerbound}); - } else { - $exclude{$sub} = 1 unless ($sub < $conf->{lowerbound}); - } + $exclude{$sub} = 1 unless ($sub < $conf->{lowerbound}); } close FP; @@ -45,7 +41,12 @@ open MI, '<', $conf->{input} or die "Can't open input file: $!\n"; open MO, '>', $conf->{output} or die "Can't open output file: $!\n"; while () { m/tag="$conf->{tag}".+?(\d+){reverse}) { + print MO if $exclude{$1}; + } else { + print MO unless $exclude{$1}; + } }