Jump to content

New user - getting a perl script to run


Recommended Posts

Hi - I just signed up for heliohost, and I've gotten logged into the file manager today for the first itme. I have a perl script I'm trying to run, and it doesn't want to. It's a simple test screipt that I thought shouldn't have any problems, so any help you can offer would be greatly appreciated.

 

The script is at:

http://mwhiting.heliohost.org/cgi-bin/test.cgi

 

All it contains is:

#!/usr/bin/perl

print "Hello World.\n";

 

Permissions are set to 755, I can't see what else is the problem.

 

 

Michael

 

Link to comment
Share on other sites

It needs an html header.

 

#!/usr/bin/perl
print "Content-type: text/html\n\n";
print "Hello World.\n";

 

Or try this and then look at the source code:

 

#!/usr/bin/perl -w
use CGI ':standard';
print header,
start_html('My Hello World'),
h1('My Hello World'),
"Hello World",
hr,
end_html;

 

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...