in reply to Re: compare a list from one file with another text file
in thread compare a list from one file with another text file
my $nohit_list = "data.txt"; open (NOHIT, "<$nohit_list")or die "can't open file: $!"; foreach $line (<NOHIT>) { print $line; my $all = "all.txt"; open (ALL, "<$all") or die "can't open file: $!"; { local $/ = '>'; @fasta = <ALL>; } my $requery = "requery.txt"; open (FASTA, ">$requery")or die "can't open file: $!"; my @nohit_fasta = (); @nohit_fasta = grep /$line/,@fasta; print FASTA @nohit_fasta;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: compare a list from one file with another text file
by jethro (Monsignor) on Apr 06, 2008 at 00:28 UTC | |
by sm2004 (Acolyte) on Apr 06, 2008 at 04:10 UTC |