cant get this to display on webpage. Apache is setup correctly. Getting error "malformed header from script. Bad header=04/19/2010: date.pl"
where am i going wrong?
#!/usr/bin/perl
use strict;
use warnings;
use POSIX qw(strftime);
my $cur_time = strftime "%a %b %e %H:%M:%S %Y", localtime;
print "$cur_time\n";
open PS, "/bin/netstat -nra 2>&1|" or die "failed with : $1";
while(<PS>)
{
#print;
$output .=$_;
}
print $output;
close (PS);
print "Content-type: text/html\n\n";
print "<HTML>\n";
print "<HEAD>\n<TITLE>Netstat Sample </TITLE>\n</HEAD>\n";
print "<strong>";
print "<br>Curent time is <font color=\"#FF0000\">$cur_time</font> MST";
print "</br>";
print "<br>$output</br>";
print "</strong>";
print "</body>\n</html>";