Help a Novice out..... (PERL script from HTML)

nlester

New Member
Messages
10
Reaction score
0
Points
0
Hi all,

I am brand-new at this. I am trying to create a form that will run a PERL script. My site is: singlesparty.pcriot.com. For now, I'm just trying to get a script ("Hello World") to run when I push the "submit" button on the web form.

Here's the HTML:

<form method="post" action="submit.pl">
<p>To invite someone to the Providence Singles Party, enter their email address here: </p>
<input type="text" size="30" name="invite_email">
<input type="submit" value="Join the Party!">
</form>



Here's the script I'm trying to run:

#!/usr/bin/perl
print "Hello World";
exit;

I put this script in a file, submit.pl, and tried it both in the public_html directory as well as in the cgi-bin directory. No luck. Any advice you could give would be much appreciated. Thank you!!

Natalie
 

woiwky

New Member
Messages
390
Reaction score
0
Points
0
I believe you need to specify the content type before you do any outputting. Try this:

Code:
#!/usr/bin/perl
print "Content-Type: text/html\n\n";
print "Hello World";
exit;

If it still doesn't work, then it might be that you haven't chmoded it to 755, which allows execution of the script.
 
Top