Well these days I realy had my first steps with Perl or more exactly ActivePerl (because I work with Windows XP). I will try here to represent the more interesting problems that I have with all connected with this language.
Here is my first problem...
I was bothering why my server doesn't output a ready script from an online book that I read now and with the exactly example I spend a lot of time to wonder "what is the problem?..". And because I do not know how to tell Perl to show me warnings and errors, I use for now Apache error.log file, where they are represented.
And I see this one:
[Wed Jun 07 16:44:05 2006] [error] [client 127.0.0.1] Premature end of script headers: d:/www/cgi-bin/yo.pl
[Wed Jun 07 16:44:05 2006] [error] [client 127.0.0.1] Can't find string terminator "EndOfText" anywhere before EOF at d:/www/cgi-bin/yo.pl line 118.
The problem source here:
>> 113
>> 114 print <<"EndOfText";
>> 115 <A NAME="form"><H2>Add a comment to the guestbook (no HTML):</H2></A>
>> 116.......#long story here....
>> 117
>> 118 EndOfText
There's one or more spaces before EndOfText on line 118. It has to be changed so that EndOfText occurs at the very start of the line. Are there more lines after line 118 too? Make sure that there is also a newline behind "EndOfText".
So it has to be like that:
>> 113
>> 114 print <<"EndOfText";
>> 115 <A NAME="form"><H2>Add a comment to the guestbook (no HTML):</H2></A>
>> 116.......#long story here....
>> 117EndOfText
>> 118
Stupid, but problem...
category: Perl, posted date: 07.06.2006, [1]
Hello! great idea of color of this siyte!