Hello, I have this code which I am using to try and run the program called a1, but it does not seem to be working. Does anyone know how to run programs using perl or cgi or use command line language in perl or cgi. Thanks!
#!/usr/bin/perl -w use CGI; $query = new CGI; # Tell perl to send a html header. # So your browser gets the output # rather then <stdout>(command line # on the server.) print "Content-type: text/html\n\n"; # print your basic html tags. # and the content of them. print "<html><head><title>Hello World!! </title>"; print "</head>\n"; print "<body><h1>Hello world</h1>"; print "</body>"; print "</html>\n"; my $prgm = system ('ssh root\@1\.1\.1\.1\executable1\a1'); if ($? == -1) { print "Command Failed: $!\n"; } else { print "Command exited with value %d", $? >>8; } print $prgm;
PS: The name of the folder is supposed to be executable1 and the a1 is the actual executable program.
In reply to executing a program by me1
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |