http://www.perlmonks.org?node_id=1026356


in reply to buffering issue?

At some point, after reading a file with 90855 lines, the script is not reading a line of the next file completely.

I'm still trying to understand what you actually observe. Does $_ not end in a newline (without being the last line in the file)? Have you verified that the correct data is in the file? What character encoding is the input file encoded in?

f ($buff >= 230000){$buff=0;sleep(1);select((select(FIL), $|=1)[0]);} #FLUSH THE BUFFER, NOT WORKING!!!

There's no reason to flush an input buffer.

Replies are listed 'Best First'.
Re^2: buffering issue?
by dannyjmh (Novice) on Mar 31, 2013 at 17:52 UTC

    Hey moritz. Thanks for the reply. Yes I have checked that all the data is in the input file, which is encoded in UTF-8. Input buffer flushing eliminated. Is there a way to flush the output buffer before start parsing the files? Thanks in advance for any other suggestions yo may have. What I see is this line:

    845667 homosapiens ENSG00000104904|ENST0000059094

    instead of:

    845667 homosapiens ENSG00000104904|ENST00000590943 92 98 7mer-m8 ? 0.017184 1<\p>

      If the file you are reading was created by the same program, make sure you closed the file before trying to read it.
      لսႽ† ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ