The HTML form generation features of CGI will save your butt here, the popup_menu() method will remember the last selected value by default. The "sticky value" behavior is very cool.
my $menu=$q->popup_menu(
-name=>"templates",
-id=>"templates",
-values=>["",23,36],
-labels=>{""=>"Select . . .",23=>"Text One",36=>"Text Two"
+}
);
You should also check out CGI::FormBuilder, which can automate a whole slew of form generation stuff, and use HTML::Template for output control.
-Any sufficiently advanced technology is
indistinguishable from doubletalk.
My Biz