#!/usr/bin/perl -w use strict; use CGI; my $q = new CGI; print $q->header( -type => "text/html"), $q->start_html, $q->start_table(), $q->Tr( $q->td("Cell1"), $q->td("Cell2") ), $q->Tr( $q->td("Cell3"), $q->td(nested()) ), $q->end_table, $q->end_html; sub nested { $q->start_table(); for (my $x = 4; $x < 8; $x++) { print $q->Tr( $q->td("cell ". $x), $q->td("cell ". $x+1) ); $x++; } print $q->end_table; }