in reply to Parsing file

I suggest reading Beginning Perl for Bioinformatics which is an excellent book for Sequence Analysis and Parsing: http://oreilly.com/catalog/9780596000806