I don't believe there is a start_tr() method, which would explain the problem :-). 
Check out the POD documentation for the CGI module by either issuing

perldoc CGI

or here:

http://search.cpan.org/author/JHI/perl-5.8.0/lib/CGI.pm

In particular seach for:  "This is extremely useful for creating tables"  in that 
document. It explains how to easily create a table row, and its associated cells 
quickly.

Most of the books that I have seen talk about how to use perl in a CGI context, and 
how to do the basic CGI tasks, many of which can be handled by the CGI module, but few 
if any really touch on real-world full application development using something like 
CGI or LWP.

http://danconia.org


------------------------------------------------
On Fri, 13 Dec 2002 05:07:18 -0800 (PST), Rob Richardson <[EMAIL PROTECTED]> wrote:

> Greetings!
> 
> I am having some trouble with a script designed to create a table. 
> Here is the important part:
> 
> use CGI::Carp qw(fatalsToBrowser);
> use CGI qw/:standard :html center *big *strong *table *tr *td
> delete_all/;
> use Time::Local;
> 
> build_calendar(param('month'), param('year'));
> 
> sub build_calendar
> {
>       my ($month, $year);
>       my (@calendar);
>       my ($currentDate);
> 
>       $month = $_[0];
>       $year = $_[1];
> 
>       @calendar = rawCalendar($month, $year);
>       print start_table({-align=>center, -width=>"95%", -border=>1});
>       for ($i = 0; $i < 6; $i++)
>       {
>               # $line = "";
>               print start_tr();
>               for ($j = 0; $j < 7; $j++)
>               {
>                       $currentDate = shift(@calendar);                
>                       # $line = $line . $currentDate . ' ';
>                       # $line = "$line$currentDate ";
>                       print td($currentDate);
>               }
>               # print "$line<BR>";
>               print end_tr();
>       }
>       print end_table();
> }
> 
> When I run this, I get the following error:
> Undefined subroutine CGI::start_tr
>  at c:\INDIGO~1\HTDOCS\CREW\CALENDAR.CGI line 82
> 
> I don't have a good book on CGI, but I think the use statement is
> correct, and the start_table() routine is working.  Why don't I have
> start_tr()?
> 
> Also, is there a bood book that actually talks about CGI?  I have a
> couple whose titles include "CGI", but they say nothing about CGI.  All
> they talk about is Perl.
> 
> Thanks!
> 
> Rob
> 
> 
> 
> __________________________________________________
> Do you Yahoo!?
> Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
> http://mailplus.yahoo.com
> 
> -- 
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to