If anyone does something in perl that uses both perl's output and
something that exec(3)s something, the perl output will not necessarily be
flushed before the other output happens.

eg.

        #!/usr/local/bin/crey
        print "Content-type: text/plain\n\n";
        system("/bin/ls");

will fail on many systems because the output from ls happens
before perl flushes its buffers.  A similar thing happens in C
on many systems.  On some systems, you will never run into
this problem.

On Fri, 18 Apr 1997, Dean Gaudet wrote:

> Why are we recommending $| = 1 all the time?  I've never had to do this in
> my CGIs.
> 
> Dean
> 
> On Fri, 18 Apr 1997, Marc Slemko wrote:
> > Have you checked the error log?  This is almost certainly a bug in your
> > CGI script.  Try adding "$| = 1;" near the start of your program and be
> > sure you correctly output the header.  
> 

Reply via email to