in reply to Debugging help please?

Are any of the FASTA modules on cpan of use to you?

Using someone else's parser might be easier than rolling your own.