I don't use Perl for Administration, and have not run too much other than
CGI apps, but you may want to try:
<CODE>
#Your code here
$command = 'pgp -kv' ;
#pass the returned value to an array
@Commands = system($command) ;
#Display the code in a nice table
print qq|<TABLE><TR><TH>COMMANDS</TH></TR>|;
#iterate through the Array for each value
for($i = 0;$i < @Commands;$i++){
print qq|<TR><TD>Commands[$i]</TD</TR>|;
}
print qq|</TABLE>|;
</CODE>
Randy Peterman
"Ackim Chisha" <[EMAIL PROTECTED]> wrote in message
033c01c12f1c$17e61930$[EMAIL PROTECTED]">news:033c01c12f1c$17e61930$[EMAIL PROTECTED]...
Hello people,
Am trying to use CGI with perl as a learner.
Now I need to display the output of a system command to HTML. It can't seem
to work I don't know why. Here is what am trying to do,
Am running the following command,
$command = 'pgp -kv' ;
system($command) ;
Print "system($command)";
This is to make perl send the output to HTML so it can display the listing
of pgp keys. it doesn't work, do I need to send the output to a file and
the display the output into an HTML format.
Or what is the better way of sending an output of a system command to HTML?
Any help would be appreciated or a site I could read!!
Regards,
Ackim
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]