Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options

Re: buffering issue?

by moritz (Cardinal)
on Mar 31, 2013 at 13:42 UTC ( #1026356=note: print w/replies, xml ) Need Help??

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.
      لսႽ ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1026356]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (6)
As of 2018-06-18 07:55 GMT
Find Nodes?
    Voting Booth?
    Should cpanminus be part of the standard Perl release?

    Results (109 votes). Check out past polls.