# script 1: create the index use Bio::Index::Fasta; # using fasta file format $Index_File_Name = shift; $inx = Bio::Index::Fasta->new( -filename => $Index_File_Name, -write_flag => 1); $inx->make_index(@ARGV); # script 2: retrieve some files use Bio::Index::Fasta; $Index_File_Name = shift; $inx = Bio::Index::Fasta->new($Index_File_Name); foreach $id (@ARGV) { $seq = $inx->fetch($id); # Returns Bio::Seq object # do something with the sequence }