http://qs321.pair.com?node_id=913728


in reply to renaming 1000's of FASTA files

The script puts all the lines from the .txt file in a hash

It just keeps creating a new 1 element hash

%seq_id = ("$fasta_id" => "$_");

you would need to say instead
$seq_id{ $fasta_id } = $_;

However, moritz has shown the better solution (instead of reopening the file over and over).