in reply to Re: System commands using CGI
in thread System commands using CGI
Hi rgt,
Thanks for the reply.
I tried using the following but it looks like the command doesnt get executed from the CGI :
When I run this from the command prompt, it the gives the correct output.#!/usr/bin/perl print "content-type: text/html \n\n"; # SET UP THE TABLE print "<table border='1'>"; print "<th>Test</th><th>Value</th><th>Expected Value</th><th>Result</t +h>"; $b=`/usr/bin/who>>/root/abcd.txt`; print "$array[1]\n\n"; #print "VALUE IS $b\n\n"; print "<tr><td>".$b."</td>";
Any idea where I am going wrong ?
Thanks.
In Section
Seekers of Perl Wisdom