I have a script that has worked fine against many small files, but when I tried to run it against a large file (~850MB), it simply hung. I tried modifying the script in order to troubleshoot it, and I found that it was hanging at the very first readline. In addition to being a very large file, it may have another problematic characteristic -- the first "line" may be composed of an extremely large number of ASCII null characters all strung together. Could the length of the file, the length of that line, or the weird characters cause read and readline to hang?