in reply to Re: multiple-choice selects
in thread multiple-choice selects
also use strict and warnings.. part of your code would break under strict... no serious problems.. but in future larger projects it could make a world of difference.
I started perl doing CGI, and to look back on my horrible code from my early CGI days now would make me sick. Also something to try coding style wise is use of $_ in foreach loops, it saves a little memory and is kinda slick.
one of your loops could be re-written as...foreach(@val) { chomp; print "<option value=".$_.">".$_."\n"; }
Make no mistake... none of this will improve/change the funcionality, but I know from personal experience that when working with CGI and new to perl that people are often more concerned with the ends than the means...so this is just some food for thought.
|
|---|