http://www.perlmonks.org?node_id=1024255


in reply to Splitting a text file

Hi,

you are already on the right track. You might try to adapt your algorithm as follows (to keep most of your ideas/code)

Hope that helps! Rata