[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Perl CGI output truncated



On Tue, 28 Oct 2008, Gerard Sharpe wrote:

>    Hi,
> 
>    Scratching my head with an issue where my Perl CGI output is being
>    truncated, however when running directly from the command line it
>    works. I've tried apache2 without any chance.
> 
>    Below is a minimal version of a script I'm useing to pull info from a
>    Cisco router and display in the web browser:
>    ---
>    #!/usr/bin/perl -w
> 
>    use strict;
>    use CGI ':standard';
> 
>    my $output;
> 
>    print header;
>    print start_html('Test');
>    print h1('Testing...');
> 
>    $output = `rsh <cisco_router> ping <ip_addr>`;
>    print "<pre>$output</pre>";
> 
>    print end_html();
> 
>    exit;


Hi Gerard,

Have you also tried with autoflush enabled? 
$|=1;



Regards,
Achim

-- 
Achim Dreyer                || http://www.adreyer.com/
Senior Unix & Network Admin || RHCE, RHCA, CCSA, CCSE, CCNA
Phone: +44 7756 948229      || CACert assurer


Reply to: