[techtalk] cgi scripts & html output

Sean McAfee mcafee at umich.edu
Tue May 16 02:10:46 EST 2000


"Shelly L. Hokanson" <guppy3 at home.com> wrote:
>it's a message forum script, called DForum. here's the link to the actual
>script if anyone wants to look at it.
>http://www.dansteinman.com/dforum/forum

>here's my problem.
>the author uses the EOF command to tell the script to output html. (what
>does EOF stand for, anyway?).

As previously mentioned, "End Of File".  It's not a command, but simply the
delimiter of a construct called a "here document", a feature Perl borrowed
from the shell.  Try this at your shell prompt:

tr a-z A-Z <<EOF
This text will be converted to uppercase.
EOF

The actual word that follows the << is arbitrary:

tr a-z A-Z <<stop-input-here
This text will be converted to uppercase.
stop-input-here

>according to him (and the other scripts i've
>played with that use that command), whatever is typed in the EOF section is
>read as html, so it's all typical html markup. good enough. well. one
>particular step in the message forum posting process you input your message,
>then click a "preview" button (form inputs in the html). all fine and dandy,
>but for some reason, this script omits one entire line of the html, where it
>would send the input text to the final post output process. on screen, i see
>everything correctly except where that line would be, it shows
>">
>obviously the end of the line of html that's being omitted. i can't figure
>out why it's doing it. there's no odd line breaks in the html, and all of
>the variables seem to be referenced correctly in the script.

>here's a link to what the problem is if you want to reproduce it. it's a
>test of a message forum on my techchron.com site:
>http://jove.prohosting.com/~tchron/dforum/forum.pl

I get a (rather extravagent) "Not Found" message when I try to view this
link.  I downloaded the forum.pl script and installed it locally, and I
can't see the behavior you describe.  For example, I entered the three
lines "Testing", "Testing", and "1, 2, 3.".  The "Submit Preview" page
presents the text just as I entered it; the page source looks like this:

    <BR>Subject: Testing
    <BR>Date: 05/16/2000
    <PRE>Testing
Testing
1, 2, 3.
</PRE>

What's the exact input you used that caused your problem?

-- 
Sean McAfee | GCS d->-- s+++: a27 C++ US+++ P+++$ L++ E- W+ N++ |
            | K w--- O? M- V-- PS+ PE Y+ PGP?>++ t+() 5++ X R+  | mcafee@
            | tv+ b++ DI++ D+ G e++ h r---* y+>++               | umich.edu





More information about the Techtalk mailing list