while (sysread (MYFILE, $myBuffer, 10*1024*1024) > 0) { # process buffer line by line }