in reply to Basic CGI Question (Moved from Q&A)

The problem that you are encountering is due to the way that
you are trying to print the HTML. The line:- print <<ENDhdr; is going to print everything to STDOUT until it finds a line
the starts with the matching ENDhdr. So you do not require
the print statements on each of the lines.
Another point is that you will require the <FORM>...</FORM> tag
around the input tags.
Things can be made MUCH easier if you were to use the
CGI.pm module eg.
#!/usr/bin/perl # use CGI; $page = new CGI; my $in; if ($ENV{'REQUEST_METHOD'} eq "GET") { $in = $ENV{'QUERY_STRING'}; } else { $in = <STDIN>; } @Texts = ("text1","text2","text3","text4","text5"); print $page->header(); # This outputs the Content-Type stuff print $page->start_html(); print $page->startform; print <<ENDhdr; ..... ..... ENDhdr print $page->endform(); print $page->end_html();
Try using perldoc CGI to get more info
Hope this is of some help