N
Nick
I am just starting out with Perl and am trying to figure out how to
setup a CGI script to perform some command line functions. I work
with some people that need to run some command line functions but we
do not want to give them command line access. I thought that if I
write a Perl CGI script that executes some of the commands for them,
it would solve our problems.
I have found tons of examples and tutorials that show you how to get a
Perl CGI to write to files, display HTML pages and print lines. What
is the correct syntax for backticks in Perl? My goal was to give them
allow
them access to some HTML pages with some forms where they enter the
options for certain commands.
For example, if I had this as my HTML form and the user entered "-al"
<form action="dosomething.cgi" method="GET">
Enter an #ls option: <input type="text" name="commd" size=30><p>
<input type="submit">
</form>
How would I get Perl to run that #ls command with the user's option
values (#ls -al) and display the end result of that command?
Would it be something similar to
`ls` $commd;
How would I show the end result?
Thanks in advance,
Nick
setup a CGI script to perform some command line functions. I work
with some people that need to run some command line functions but we
do not want to give them command line access. I thought that if I
write a Perl CGI script that executes some of the commands for them,
it would solve our problems.
I have found tons of examples and tutorials that show you how to get a
Perl CGI to write to files, display HTML pages and print lines. What
is the correct syntax for backticks in Perl? My goal was to give them
allow
them access to some HTML pages with some forms where they enter the
options for certain commands.
For example, if I had this as my HTML form and the user entered "-al"
<form action="dosomething.cgi" method="GET">
Enter an #ls option: <input type="text" name="commd" size=30><p>
<input type="submit">
</form>
How would I get Perl to run that #ls command with the user's option
values (#ls -al) and display the end result of that command?
Would it be something similar to
`ls` $commd;
How would I show the end result?
Thanks in advance,
Nick