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.
In reply to Re: Splitting a file based on matched conditions
by talexb
in thread Splitting a file based on matched conditions
by skumar_pm
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |