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

Perl CGI output truncated


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();


The problem being the output is being truncated:

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to <ip_addr>, timeout is 2 seconds:

Success rate is 100 percent (5/5), round-trip min/avg/max = 4/4/8 ms

I'm running:
# perl -v

This is perl, v5.8.8 built for i486-linux-gnu-thread-multi

Copyright 1987-2006, Larry Wall

Perl may be copied only under the terms of either the Artistic License
or the
GNU General Public License, which may be found in the Perl 5 source

Complete documentation for Perl, including FAQ lists, should be found
this system using "man perl" or "perldoc perl".  If you have access to
Internet, point your browser at http://www.perl.org/, the Perl Home

# apache -v
Server version: Apache/1.3.34 (Debian)
Server built:   Jan 18 2008 19:16:57

Any help would be appreciated.


Reply to: