Problem with Perl writing HTML attributes

 
Post new topic   Reply to topic    Aprelium Forum Index -> General Questions
View previous topic :: View next topic  
Author Message
pluppus
-


Joined: 18 Sep 2009
Posts: 2

PostPosted: Fri Sep 18, 2009 6:21 pm    Post subject: Problem with Perl writing HTML attributes Reply with quote

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 View user's profile Send private message
DonQuichote
-


Joined: 24 Dec 2006
Posts: 68
Location: The Netherlands

PostPosted: Sat Sep 19, 2009 10:38 am    Post subject: link... Reply with quote

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 View user's profile Send private message
Lawrence
-


Joined: 16 Jan 2003
Posts: 207
Location: Brisbane, AU

PostPosted: Sun Sep 20, 2009 12:14 am    Post subject: Reply with quote

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 View user's profile Send private message Visit poster's website ICQ Number
pluppus
-


Joined: 18 Sep 2009
Posts: 2

PostPosted: Sun Sep 20, 2009 1:27 am    Post subject: That was the problem, Many Thanks Reply with quote

That was the problem, Many Thanks!
Back to top View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Aprelium Forum Index -> General Questions All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB phpBB Group