On Mon, 4 Mar 2002, Jason Frisvold wrote: > I'm looking for a way to have perl output in an asynchronous > manner. What I mean is, if I write a perl script to generate a large > amount of data and output it to the screen, it seems to pause until some > unknown buffer is full and then spit out the output.. pause again, show > output, etc. It does the same thing with files. I can watch the > filesize for the output and it seems to only jump in size every so > often. > > My main goal here is so that the data is streamed so that a web > browser can begin displaying the data without a long pause. > > Is there a way to do this, or should I switch to C++?
Set $| to a positive value ($|++ will do). This turns on the autoflush mechanism for the currecntly selected filehandle. There's a FAQ on this: perldoc -q flush -- Brett http://www.chapelperilous.net/ ------------------------------------------------------------------------ Space tells matter how to move and matter tells space how to curve. -- Wheeler -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]