http://www.perlmonks.org?node_id=1006805


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 :
#!/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>";
When I run this from the command prompt, it the gives the correct output.

Any idea where I am going wrong ?

Thanks.