note
reneeb
<code>#! /usr/bin/perl
use strict;
use warnings;
my $id_file = '/path/to/file/with/ids.txt';
my $fasta_file = '/path/of/fasta/file.fasta';
open(my $fh, "<$id_file") or die $!;
my @ids = <$fh>;
close $fh;
{
local $/ = "\n>";
open(my $fh, "<$fasta_file") or die $!;
while(my $entry = <$fh>){
print $entry if(grep{$entry =~ /\Q$_\E/}@ids);
}
}
</code>
466253
466253