in reply to CGI && tables nested within tables.

Just an observation:

If you only use one CGI query object you can use the default CGI object by invoking something like:

use CGI qw(:standard);
Then you don't have to use the $q-> object:
print $q->header; becomes print header;

If you know what methods you'll be using you can import them individually:

use CGI qw(param header url); my $url = url();