For lack of enough specific information to give you a detailed answer, the standard answer is to use a templating engine, such as Template::Toolkit, probably as part of a dynamic web-framework such as Dancer or Catalyst.
CountZero A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James
| [reply] |
I have recently had success using HTML::FormFu (HTML::FormFu::Manual::Cookbook) to build up forms programmatically. The documentation focuses on YAML file examples, but you can build everything up using the populate and elements methods. Just turn each row into a hash describing the field and then pass them all in to the FormFu object. No ugly HTML munging!
| [reply] |