in reply to get the line with ith occurrence of '>'

Can you give us 10 example lines from the file?

You can do something like:
my $filecounter = 0; open INPUTFILE, "InputFile"; open OUTPUTFILE, "outputfile.$filecounter"; while (<INPUTFILE>) { if ($. % 1000000) { close OUTPUTFILE; $filecounter++; open OUTPUTFILE, "outputfile.$filecounter"; } print OUTPUTFILE $_; }

If one ">" per line.. but example data would make it easier to tell how robust the split has to be.

Waswas-fng