All,
i am new to cgi. Please let me know why I dont get the data printed?
I have abc.cgi in /var/www/cgi-bin

When the $cmd is "ls" I get the filenames when I visit localhost/cgi-bin/abc.cgi
But when the $cmd is the snmpquerry, I get nothing on the page, though I get 
the desired output(value of sysContact.0) when I run the script in commandline.

----------------------------
#! /usr/bin/perl
print "Content-type: text/html\n\n";
print <<"END OF PRINT";
<html>
<head><title>test</title></head>
<body>
END OF PRINT
my $cmd = "snmpget 23.23.23.23 public sysContact.0";
#my $cmd = "ls";
my $res = qx!$cmd!;
chomp($res);
print <<"end of print";
<center>
$res
</center>
</body></html>
end of print
-------------------------------------

TIA
Tapas

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to