Actually, CGI is nothing more than a interface to communicate with the Perl script and the webserver. The only thing CGI needs are headers. For displaying each web page, the server must send a header, so CGI has to do the same. Everything should work when you put a MIME type in your script, don't forget! :

print "Content-type: text/html\n\n"; # most used MIME content-type

I heard good things about Programming Perl, but I assume the Perl Cookbook is very good too. I have a ebook (licensed) and it's very good.
It's at astalavista.com. Also, for checking things, buy Perl Pocket Reference. All very good.

(Oh yea, for some extra functions in your CGI, which aren't too famous but come in very handy, buy CGI Programming with Perl.)



--------------
Bob Erinkveld (Webmaster Insane Hosts)
www.insane-hosts.net
MSN: [EMAIL PROTECTED]





From: Rob Richardson <[EMAIL PROTECTED]>
Reply-To: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: start_tr
Date: Fri, 13 Dec 2002 05:07:18 -0800 (PST)

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]

_________________________________________________________________
Ontvang je Hotmail & Messenger berichten op je mobiele telefoon met Hotmail SMS http://www.msn.nl/jumppage/


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

Reply via email to