in reply to Re: hang caused by read / readline?
in thread hang caused by read / readline?
And that's where it chokes. If I insert a print statement before and after the readline (as checkpoints), the first one will work, and the second one will not. I don't have experience using read, and when I tried replacing the readline with a simple read earlier, It looked like the same hang was happening. However, when I tried it again just now, it worked fine:... open (INPUTFILE, $inputfile) or die ("\nERROR: Unable to open file +\"$inputfile\".\n"); while (!eof(INPUTFILE)) { $line = readline(INPUTFILE); ...
Since I knew (from MUCH smaller files) that the input files would have chunks of chr(0) at the front, I wrote a bit of code around the read statement above to see just how bad the situation is for this particularly large file. As I write this message, we're at 120MB worth of continuous chr(0) and counting...read(INPUTFILE, $x, 1);
|
|---|