in reply to Splitting a file based on matched conditions
I would recommend using Tie::File for this -- you'll be able to easily look at the last line of the file, make your decision on how to split the file, then write the portions of the file out as necessary.
|
|---|