You might need to supply some more details, but if everything in your "big
list" is unique, you could (untested code by the way!)
my %list;
open(OUT, $outfile) || die "cannot open $outfile: $!";
open(LIST, $listfile) || die "cannot open $listfile: $!";
while(<LIST>)
{
my $line = $_;
chomp $line;
$list{$line} = 1;
}
open(FILE, $file) || die "cannot open $file: $!";
while(<FILE>)
{
my $line = $_;
chomp $line;
if($list{$line}){print OUT $line."\n"}
}
This assumes that the two files are the same format. You may need to include
extracts of the two files in your email if they are not.
Adam
> I need to find every line in a file where compare a name of a different big
> list(in another file).I need every line in a new file.Please help me!
>
> _________________________________________________________________
> Scarica GRATUITAMENTE MSN Explorer dall'indirizzo
> http://explorer.msn.it/intl.asp.
>
>