in reply to how many chars/bytes does STDOUT buffer

thanks for pointing out that its system dependant .

  • Comment on Re: how many chars/bytes does STDOUT buffer

Replies are listed 'Best First'.
Re^2: how many chars/bytes does STDOUT buffer
by ikegami (Patriarch) on Apr 05, 2015 at 06:14 UTC
    It's not. See BrowerUk's answer.
Re^2: how many chars/bytes does STDOUT buffer
by Anonymous Monk on Apr 06, 2015 at 12:29 UTC
    Yes, Perl does have its own buffer, in addition to whatever buffering the operating system may or may not do. The safest thing to do is to assume that the size of the buffer is unpredictable. If you need to explicitly flush it, do so, but do not build-in any assumptions as to how large it is.

      in addition to whatever buffering the operating system may or may not do.

      The OS may delay writing it to disk a little after receiving it, but it will appear to be on the disk to anyone trying to read the file immediately after Perl sends it to the OS.

      That means that if you you use flush or autoflush to send the data to the OS, it will be immediately available to everyone, though the data could be lost if a power outage occurs shortly after.