Thanks Bill. The CGI runs but it has not completed all it is supposed to do.

It only print "forum" and does nothing else. I guess

the following part does not work at all:


$FORM{'suggest'}=~s/cM\n/<br>\n/g;

$filename="c:/website/htdocs/book.html";

print"<h1>forum2\n</h1>";
open(FILE,">> $filename");
print FILE "name:$FORM{'name'}<br>\n";
print FILE qq!Email:<a href="mailto:$FORM{'email'}>$FORM{'email'}</a><br>\n"}!;
print FILE "suggetion:$FORM{'suggest'}";
close{FILE};

print "<h2>thanks</h2>";

print"<a href="\"book.html\">please" look at the suggestions</a>";


exit(0);

Thanks

Liming

 $Bill Luebkert <[EMAIL PROTECTED]>wrote:

liming zhao wrote:
> hey, my cgi in perl have some problems. I need help so much .
>
> Thanks in advance.
>
>
> CGI Error
>
> The specified CGI application misbehaved by not returning a complete set
> of HTTP headers. The headers it did return are:
>
> Bareword found where operator expected at C:\website\cgi-shl\guest-book.cgi line 29, near ""Email:< pre>
>
> ===========================================================
>
> I runs activeperl on winXP pro with IIS 5.0.
>
> the form is as following:
>
>
>
>

forum


>
>

name?
>

email:
>

suggestion?
>


>
>
>
>
>
>
> ======================================================
>
> the following is the cgi written in perl.
>
> #! perl
>
> print"Content-type:text/html\n\n";
> read(STDIN,$buffer,$ENV{'CONTENT_LENGTH'});
> @pairs=split(/&/,$buffer);
> foreach $pair(@pairs){
> ($name,$value)=split(/=/,$pair);
> $value=~tr/+//;
> $value=~s/%([a-f A-F 0-9][a-f A-F 0-9])/pack("C",hex($1))/eg;
> $FORM{$name}=$value;
> }
> print"";
> print"

forum

";
>
> foreach $check(values%FORM){
> if($check eq""){
> print"
";
> print"

forum";
> exit(0);
> }
> }
>
> $FORM{'suggest'}=~s/cM\n/
\n/g;
>
> $filename="c:/website/htdocs/book.html";
>
> open(FILE,">> $filename");
> print FILE "???$FORM{'name'}
\n";
> print FILE "Email:
You have quotes embedded in quotes. Either escape the inner quotes (\") or
replace the outer quotes with something like:

print FILE qq!Email:
or
print FILE <Email:
> close{FILE};
>
> print "

thanks for your suggestion

";
>
> print"
please observe the forum";
>
>
> exit(0);

--
,-/- __ _ _ $Bill Luebkert ICQ=162126130
(_/ / ) // // DBE Collectibles Mailto:[EMAIL PROTECTED]
/ ) /--< o // // http://dbecoll.tripod.com/ (Free site for Perl)
-/-' /___/_<_
_______________________________________________
Perl-Win32-Web mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs



Do You Yahoo!?
Yahoo! Finance - Get real-time stock quotes

Reply via email to