I currently have a html webpage with three fields - a drop down box selector with five choices, and two text fields.
I am trying to write a cgi script which will will run three different sets of programs each found in five different directories which I am trying to get the interface to control. I effectively need the drop down box selector to govern which path the rest of the information has to go down. For example if the selection 'alpha' is chosen, the perl programs found in the alpha directory will be run, and so on for other choices.
However my question is how do I write a cgi script file which will run three different programs in succession?
The first program is usually run from the terminal as follows:
./search1.pl -file="names.1.list" -word="the" -output=temp/names
The arguments -file desginate the file to be searched, -word the word to look for in the file, and -output the destination to write the results of the search in temp (directory already created)
The remaining two programs simply sort the list into various orders. However the last program produces a statistics file which I write to a file (normally using > followed by a filename) which is now needed to be output to the web browser instead as it simply contains text.
How do I do all this so that the name to call the -output file in the above example was taken from the html form field and the -word was taken from another field in the form submitted. I need to do this remember running the programs in succession. i.e: the search1.pl script obviously before the sorting files.
Many thanks with this problem - my experience with cgi is very limited (as you can probably tell!) however I have been writing simple perl scripts from the command line for a while now