Solved

executing Perl script

Posted on 1998-12-25
4
318 Views
Last Modified: 2013-12-25
I have written CGI script in PERL,
Error shown : "String Termination after the line content type"
Q : How to execute it?
print "Content-type: /text/html\n\n";

print<<EOF;
<HTML>
<BODY>
<H1> Hello world </H1>
</BODY>
</HTML>
EOF;
0
Comment
Question by:Bala123
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 1

Expert Comment

by:wisdom042597
ID: 1830292
If you're getting an error, then you probably are executing the script (technically speaking).  I'd need to see the source to help debug the script - or at least the problem part.

Also, it depends upon whether you want to execute the script on your local machine, or on an internet server at your ISP.
0
 

Author Comment

by:Bala123
ID: 1830293
Edited text of question
0
 
LVL 84

Expert Comment

by:ozo
ID: 1830294
the closing tag to trminate a here-document should be alone on the line with no extra white space, and no extra semicolon
0
 
LVL 1

Accepted Solution

by:
cox earned 50 total points
ID: 1830295
use this:

print "Content-type:/text/html\n\n";

print<<EOF;
<HTML>
<BODY>
<H1> Hello World </H1>
</BODY>
</HTML>
EOF

Take off the "  ; " at last line...
  ;))
0

Featured Post

Resolve Critical IT Incidents Fast

If your data, services or processes become compromised, your organization can suffer damage in just minutes and how fast you communicate during a major IT incident is everything. Learn how to immediately identify incidents & best practices to resolve them quickly and effectively.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this tutorial I will show you how to provide a dynamic RTF document on your website generated with data from your database. For this tutorial you will need Microsoft Word or WordPad, WhizBase and Microsoft Access. In this tutorial I will show …
In threads here at EE, each comment has a unique Identifier (ID). It is easy to get the full path for an ID via the right-click context menu. However, we often want to post a short link within a thread rather than the full link. This article shows a…
Learn the basics of strings in Python: declaration, operations, indices, and slicing. Strings are declared with quotations; for example: s = "string": Strings are immutable.: Strings may be concatenated or multiplied using the addition and multiplic…
The viewer will learn how to dynamically set the form action using jQuery.

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question