#!/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(),
$q->Tr(
$q->td("Cell4"),
$q->td("Cell5")
),
$q->Tr(
$q->td("Cell6"),
$q->td("Cell7")
),
$q->end_table,
}
####
#!/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;
}
####
Untitled Document