It's not. See BrowerUk's answer. | [reply] |
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. | [reply] |
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.
| [reply] [d/l] [select] |