in reply to Re^2: simple regex question
in thread simple regex question
When run from the command line, STDOUT is indeed unbuffered and you see alternating buffered/unbuffered statements. However for example if I run this in Textpad (my editor on Windows - I think similar to Notepad++) and have it capture the output, STDOUT is buffered. And the first buffered line is output after about 88 lines. I conclude that on my Windows system the buffer is about 8KB. So it depends upon where STDOUT is directed to.#!/usr/bin/perl -w use strict; for (0..200) { print "$_ buffered xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\n"; print STDERR "$_ unbuffered \n"; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: simple regex question
by JavaFan (Canon) on Nov 27, 2010 at 11:10 UTC |