in reply to Re: split file at line number
in thread split file at line number

Just replace $. % $SPLIT_POINT == 1 with the split condition in the code I provided.