My post is based out of curiosity.
There are three camps (at least):
- Those that hard code their html inline in their perl.
- Those that use CGI.pm to generate their html.
- Those that use a templating system to fill values into an existing html template.
All three choices have their benefits. They also each have downsides. These choices all cover a scale that has raw execution speed on one end and good design (separation of content) on the other end. Since the HTML generation aspects of CGI.pm fall in the middle of this scale, I am always interested to know what factors are driving the decision to use CGI.pm over a templating system or just raw html.
So that was a long way to ask: why have you chosen to use CGI.pm over either raw html or a templating system.
If the answer is "I'm not sure" then a would suggest using a templating system - even if it means that the html template is inline as a variable in the code.
my @a=qw(random brilliant braindead); print $a[rand(@a)];