in reply to Read files and convert extracted text to .csvc

In addition to the advice from toolic, here is a further hint:
local $/ = "##################\n";
before you read the file. That will cause the read to transfer the entire block record, rather than a line at a time. It is documented in perlvar.