• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

HTML Forms and Perl

jgbishop

Senior member
I have a ton of small Perl scripts that I run often. Many of them involve placing text in an input file, running the script, and getting some altered text from an output file. I would like to change to a HTML page to do all of this.

Essentially, I would have two text boxes on the page (one for input and one for output), and I would have a pull-down box with all my Perl scripts in them. Each time I want to run a script, I would simply select the script to run, enter the text in the input box, click a button, and the output text would appear in the output box.

What I want to know is, how can I redirect a perl script to the same form? In other words, I want the post action for my form to be a perl script, which returns some text to the same form. Does anyone know how I could achieve this? I'm afraid JavaScript just won't do for some of the stuff I'm doing...
 
Create your perl script so that it just returns the form (blank) when given no parameters. Then when you click submit, the script should detect it, do the action, and redisplay the form with the results in the result textarea.

Assume the script is called: script.pl. You type in http://something/script.pl. The HTML says to send the form to script.pl (itself). When you hit submit, the post data gets sent to script.pl, the data is processed, and the form is sent to the browser with the results.
 
Back
Top