I think most of the answer to this question is HTML not Perl, but I'll answer it anyway.
The easy way of selecting a question would be an HTML select list.
The Perl script to read the answers would be something like<form method="post" action="http://myserver/perl_script"> <p>Which question do you want to answer? <select name="question"> <option value="1">Question 1</option> <option value="2">Question 2</option> <option value="3">Question 3</option> <option value="4">Question 4</option> </select> </p> <p>Answer your question in the textbox:<br /> <textarea name="answer" rows="20" cols="70"></textarea> <input type="submit" value="submit"/> </form>
#!/usr/bin/perl use strict; use warnings; use CGI; my $cgi = CGI->new; my $question= $cgi->param("question"); my $answer = $cgi->param("answer");
In reply to Re: Executing perl script with html textarea
by space_monk
in thread Executing perl script with html textarea
by Bowlslaw
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |