Help for this page
# assumes that duplicates in first file should be ignored. my %wanted; ... chomp $line); $wanted{$line}++; }
my $foo = (split /|/, $line)[1];
print OUT $line if $wanted{$foo};