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.