Ïðèãëàøàåì ïîñåòèòü
Áðþñîâ (bryusov.lit-info.ru)

Q&A

Previous Table of Contents Next

Q&A

Q1:

Do HTML forms have to be this ugly?

A1:

The forms in this book are simple, plain, bare-bones, and—some would say—ugly. The purpose of Sams Teach Yourself Perl in 24 Hours is to teach you Perl and CGI programming, not HTML. In fact, most of the HTML in this book is not up to standards and is not complete; it lacks <head> tags, <html> tags, DTD headers, and so on. By providing basic HTML, I hope you'll correct this for your own needs.

As I mentioned earlier, a good method for spicing up your forms is to explore the Web and find a form you like. By viewing the source, you can get an idea of how the pages are put together.

Q2:

I'm getting the Can't find string terminator "XXXX" anywhere before EOF at... error. What is it?

A2:

This error is caused by having an open quote somewhere in your program without a matching close quote. When you use here documents, this means that the word you've used to mark the end of the here document can't be found. The format is as follows:


print <<MARK;

text

text

text

MARK


The here document beginning and ending words—in this case, the word MARK—must be exactly the same. The terminating word must appear with nothing in front of it, on a line by itself, and with nothing after it. MS-DOS and Windows text editors sometimes do not put an end-of-line character after the last line of the program. If your here program ends at the end of the file, try putting a blank line after it.

    Previous Table of Contents Next