perl-embperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From allen haim <>
Subject Syntax=perl problem
Date Fri, 03 Jun 2005 00:01:15 GMT

Could someone please help with this Syntax=Perl problem?



$r = shift;

        inputfile => '/usr/local/apache2/cgi-perl/warreng/',
        syntax => 'Perl',
        output => \$out,

        #options => 256,
        #req_rec => $r


[+ $out +]


print 'allen';

When I point to http://localhost/notemplate/test3.html, I get:


with nothing after it. 

If I hit reload about 5 or 6 times, sometimes I will get the following:

allenHTTP/1.1 200 OK Date: Thu, 02 Jun 2005 16:57:42 GMT Server: Embperl/2.0rc3 Apache/2.0.52
(Unix) mod_perl/1.999.21 Perl/v5.8.5 Content-Length: 72 Keep-Alive: timeout=15, max=99 Connection:
Keep-Alive Content-Type: text/html; charset=ISO-8859-1

output: allen

It's as though the 'allen' is getting printed but not actually sent.

Finally, I added the line:

select((select(STDOUT), $| = 1)[0]);


Now, 'allen' is printed *before* 'output:' is printed.

What is the right way to call an arbitrary perl script and catch its output?




now through the seven oceans, 
i am a star most famed;
many leggies have I lost,
many have I gained.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message