in reply to OUTPUT: inline or template_based?

There are several advantages to templates (HTML::Template is my fave, and a popular choice), among which on emight include: Having said that, for short and simple data output, I agree that the overhead in setting up the template (overhead in terms of that most important=to-optimise variable, developer time) sometimes makes one want to dump it straight into the code.

In this case (as in so many others) CGI.pm is often the way to go, as its built in functions make on-the-fly html generation in the code a good deal quicker and more readably integrated with the rest of the code. Your example wd become:
use CGI qw/:standard/; print header, start_html, "Today's variable is: ", $myvar, end_html;
+ n.b. that the more complex the html you are outputting, the more time and space the CGI functions become.

When dumping large quantities of info into html tables, I felt the need of something like this, which you may also find useful.

§ George Sherston