On Mar 20, 8:33 pm, "robertchen...@gmail.com"
<robertchen...@gmail.com> wrote:
> my $cgi = new CGI;
> print $cgi->start_table({-border=>0});
> print "<tr align=\"left\">";
> print $cgi->th('Sunday');
> print $cgi->th('Monday');
> print $cgi->th('Tuesday');
> print $cgi->th('Wensday');
> print $cgi->th('Thursday');
> print $cgi->th('Friday');
> print $cgi->th('Saturday');
>
> Now I have a date, say "0320/2007", How could I print on the
> "'Tuesday" column cell?
>
> $cgi->td could do this? If not, how could I do?
Just as in all things Perl, there are many ways to do it.
This is one...
my $q = new CGI;
print $q->table(
$q->Tr(
[
$q->th( [ 'Sunday', 'Monday', 'Tuesday', 'Wednesday',
'Thursday', 'Friday', 'Saturday' ] ),
$q->td( [ ' ', ' ', '03/20/2007', ' ',
' ', ' ', ' ' ] )
]
)
),
"\n";
The bigger problem is how do you fit that into your code and data
flow?
|