Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re^3: System commands using CGI

by rjt (Deacon)
on Dec 03, 2012 at 09:05 UTC ( #1006823=note: print w/ replies, xml ) Need Help??


in reply to Re^2: System commands using CGI
in thread System commands using CGI

Your code here did not generate that output. It was hard to read without <code> tags, so I reformatted it for you:

#!/usr/bin/perl print "content-type: text/html \n\n"; # SET UP THE TABLE print ""; print ""; $b=`/usr/bin/who&gt;&gt;/root/abcd.txt`; print "$array<a href="?node=1">1</a>\n\n"; # <== FIXME #print "VALUE IS $b\n\n"; print "";

Your code here does not compile. You need to escape the double quotes in your print "$array... line.

Beyond that, however, why in the world are you trying to append the output of /usr/bin/who to /root/abcd.txt? More to the point, please let us know exactly what your CGI program is supposed to do, and perhaps then we can get to the root of the problem (no pun intended... or maybe it was...).


Comment on Re^3: System commands using CGI
Select or Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1006823]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (12)
As of 2014-07-31 09:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (248 votes), past polls