in reply to mod_perl2 unbuffered printing

What am I missing...

I think (oracle says ) $r->rflush

[ddg://buffering site:http://perl.apache.org/docs/] [ddg://buffering "$|" site:http://perl.apache.org/docs/] [ddg://mod_perl buffering] [ddg://buffer "$|=1;" site:http://modperlbook.org] [ddg://rflush "$|=1;" site:http://modperlbook.org]

ddg://buffering site:http://perl.apache.org/docs/ ddg://buffering "$|" site:http://perl.apache.org/docs/ ddg://mod_perl buffering ddg://buffer "$|=1;" site:http://modperlbook.org ddg://rflush "$|=1;" site:http://modperlbook.org

UNIX/LINUX TECH NOTES: Resolving Perl CGI buffering issue Practical mod_perl: 13.3. Buffered Printing and Better print( ) Techniques Practical mod_perl: 25.3.3.3. Stream-based HTTP request input filter

Replies are listed 'Best First'.
Re^2: mod_perl2 unbuffered printing
by cappaberra (Initiate) on Jul 24, 2012 at 16:32 UTC

    Your reference specifically helped... http://honglus.blogspot.com/2010/08/resolving-perl-cgi-buffering-issue.html. Now, the code works as I expect (see below). I guess this is normal behavior and something was screwed up on my RHEL 4 server... hm. Also, since i'm doing my own "buffer management", I removed the $|=1; line.

    #!/usr/bin/perl -W use strict; my $r = shift; print "Content-type: text/html\n\n"; for (my $x=1; $x<=10; $x++) { print($x); sleep 1; $r->rflush; } exit(0);

    Thank you!