You might benefit from implementing this with CGI::Application. It uses a perl module to define different run modes for a program on a function basis, much as you are doing now. Also, it has built-in support for CGI and HTML::Template, so you could easily implement Aristotle's suggestion to use a templating system (which, BTW, I also highly recommend.)
Take a look at the documentation on CPAN, as well as a good article on PerlMonks.
In reply to Re: Making a code shorter
by DamnDirtyApe
in thread Making a code shorter
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |