I use HTML::Template which can be configured to make selections, or even Javascript, but both are "messy". I highly recommend HTML::FillInForm. Here's an example of it's use.
—Brad "The important work of moving the world forward does not wait to be done by perfect men." George Eliot
Comment on Re: Sticky selected options using templates