in reply to sorting headers in a file
There are many, many nodes here regarding how to best parse FASTA files. Most likely Super Search will turn up even more nodes. Have you looked through what BioPerl has to offer?