in reply to how to split

For those who are not familiar with this format, you are trying to parse a BLAST report. I don't know if you are familiar with BioPerl (specially SearchIO), but if you are unsure writing your own code, maybe you should take a look at it.

You can find here a nice tutorial that will let you to work with BLAST reports

citromatik