View previous topic :: View next topic |
Author |
Message |
pluppus -
Joined: 18 Sep 2009 Posts: 2
|
Posted: Fri Sep 18, 2009 6:21 pm Post subject: Problem with Perl writing HTML attributes |
|
|
Using AbyssX1 (v2.6)
For some reason when I use an attribute in an HTML tag written in ACTIVE PERL 5.10.1.1006, I receive an Internal Server Error.
This runs on Abyss just fine:
#! C:/Perl/bin/perl
print "Content-Type: text/html\n\n";
print "<HTML>\n";
print "<HEAD>\n";
print "<TITLE>CGI TEST NUMBER 4</TITLE>\n";
print "</HEAD>\n";
print "<BODY>\n";
print "Hey there hi there ho there\n";
print "</BODY>\n";
print "</HTML>\n";
This will not run on Abyss
#! C:/Perl/bin/perl
print "Content-Type: text/html\n\n";
print "<HTML>\n";
print "<HEAD>\n";
print "<TITLE>CGI TEST NUMBER 4</TITLE>\n";
print "</HEAD>\n";
print "<BODY>\n";
print "<font face="Sans Serif">Hey there hi there ho there</font>\n";
print "</BODY>\n";
print "</HTML>\n";
I receive error log: Bareword found where operator expected at test4.cgi line 11, near ""<font face="sans"
(Missing operator before sans?)
syntax error at test4.cgi line 11, near ""<font face="sans serif"
Execution of test4.cgi aborted due to compilation errors.
CGI: [C:\Perl\bin\perl.exe test4.cgi ] URI: /scripts/test4.cgi Broken pipe
[b]But runs fine as an HTML file in abyss[/b]
<HTML>
<HEAD>
<TITLE>CGI TEST NUMBER 4</TITLE>
</HEAD>
<BODY>
<font face="Sans Serif">Hey there hi there ho there</font>
</BODY>
</HTML>
My Scripting Parameter settings are:
Interface: CGI/ISAPI
Interpreter: C:\Perl\bin\perl.exe
Type: ActivePerl ISAPI and I've tried Standard
Associated Extensions: pl, cgi
Script Paths: /*.pl, /*.cgi
Index Files Include:
index.pl and index.cgi
I'm new to this must be something I didn't configure correctly. |
|
Back to top |
|
|
DonQuichote -
Joined: 24 Dec 2006 Posts: 68 Location: The Netherlands
|
Posted: Sat Sep 19, 2009 10:38 am Post subject: link... |
|
|
I know next to nothing about Perl, but does this help?
http://www.perlmonks.org/?node_id=401006
It seems that double quotes are "evaluating quotes" in Perl, just as they are in bash and PHP. |
|
Back to top |
|
|
Lawrence -
Joined: 16 Jan 2003 Posts: 207 Location: Brisbane, AU
|
Posted: Sun Sep 20, 2009 12:14 am Post subject: |
|
|
Reasonably sure that's the problem. This line in particular:
Code: | print "<font face="Sans Serif">Hey there hi there ho there</font>\n"; |
The quotes around Sans Serif are breaking things. You'll have to escape them so Perl doesn't treat them as the end/beginning of the string. |
|
Back to top |
|
|
pluppus -
Joined: 18 Sep 2009 Posts: 2
|
Posted: Sun Sep 20, 2009 1:27 am Post subject: That was the problem, Many Thanks |
|
|
That was the problem, Many Thanks! |
|
Back to top |
|
|
|