It looks like you've got a FASTA format file. There are lots of modules on the CPAN to handle that file format, for example the BioPerl suite is frequently recommended. There are various nodes on this site that show the use of that module.
Other than that, as has already been said, please see How do I post a question effectively? and Short, Self-Contained, Correct Example - in this case, your question is missing representative sample input and the expected output for that input, which means that anyone wishing to help you has to make some up, and that may not be representative of your actual input. Update: I'm going to assume that this node shows representative input, despite the fact that it doesn't compile.