You can use Mason via CGI, although that would require you getting the modules installed, some of which, may need compiling.
.
It sounds to me though, like you mainly want to use a template for the tables, in that case, there are many templating solutions you could use. Some like
, others prefer Mason, or Embperl. There are lots of options you can just stick into your script to display the data nicely.