in reply to Creating HTML tables

It sounds like you need HTML::CalendarMonth,
"HTML::CalendarMonth - Perl extension for generating and manipulating HTML calendar months"

"Multiple cells of the calendar can be manipulated as if they were a single element. For instance, $c->item(15)->attr(bgcolor => 'cyan') would alter the background color of the cell representing the 15th. By the same token, $c->item(15, 16, 17, 23)->attr(bgcolor => 'cyan') would do the same thing for all cells containing the item symbols passed to the item() method."

I have not personally used this module, but it sounds like it would do what you need.

update: HTML::CalendarMonthSimple seems even better suited to meet your requirements.
"HTML::CalendarMonthSimple is a Perl module for generating, manipulating, and printing a HTML calendar grid for a specified month. It is intended as a faster and easier-to-use alternative to HTML::CalendarMonth."

    ...each is assigned his own private delusion but he cannot see the baggage on his own back.