in reply to get the line with ith occurrence of '>'
my $filecounter = 0; open INPUTFILE, "InputFile"; open OUTPUTFILE, "outputfile.$filecounter"; while (<INPUTFILE>) { if ($. % 1000000) { close OUTPUTFILE; $filecounter++; open OUTPUTFILE, "outputfile.$filecounter"; } print OUTPUTFILE $_; }
|
|---|