Link to home
Start Free TrialLog in
Avatar of Bala123
Bala123

asked on

How to excute this perl script

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
ASKER CERTIFIED SOLUTION
Avatar of Mike Montgomery
Mike Montgomery
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Oops!

Further to my answer, you have not closed the print so the program is still looking for the end of the "file"..

Change my answer to

print "Content-type: /text/html\n\n";
      print<<EOF
      <HTML>
      <BODY>
      <H1>Hello world</H1>
      </BODY>
      </HTML>
EOF
## Note the last line has no leading spaces..