in reply to How can I send more than 1MB to a TCP socket?
Have you tried chunking up the input side?
open (LOG, $file); binmode LOG; $linelen = 1024*1024; while(!eof(LOG)) { my($buf); $len = sysread LOG,$buf,$linelen; syswrite OUT,$buf,$len if($len); } close(LOG);
The above is a chunk of code that worked for me, I assume that using file handles won't mess it up.
Update:Fixed the confusion between LOG (from the question) and IN (from my previous experience) (thanks bart)
|
|---|