in reply to some advice...
CGI::FormBuilder is an answer to your problem, but not to your question.
You still need to feed it the hashref of value => label, but it will do all the icky HTML whatnot for you.
HTH