httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Aaron Morris <aaronmor...@mindspring.com>
Subject Re: [users@httpd] apache 2.0.48 unbuffered output from perl script (CGI)
Date Wed, 12 Nov 2003 02:16:05 GMT


Carl Brewer wrote:
> 
> Hello,
> 
> I'm trying to unbuffer output from some long running
> perl scripts that run through CGI (not mod_perl).
> 
> A script example is :
> 
> #!/usr/bin/perl
> 
> print "Content-type: text/html\n\n";
> 
> my $i = 0;
> $| = 0;
> 
> while ($i < 10) {
>     print "$i<BR>\n";
>     sleep 2;
>     $i++;
> }
> 
> thanks
> Carl

Well, I can tell you one problem.  You have explicitly enabled buffered 
output in perl.  $| should be set to any non-zero value to disable 
buffered output.

-- 
Aaron W Morris <aaronmorris@mindspring.com> (decep)




---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message