How do I make CGI PERL scripts work properly within HTML?

I am trying to set up my Intranet web page to allow for survey polling.  I have found a couple of PERL scripts which will allow me to do this with CGI however I can not get them to execute properly.  I am not sure what I am missing here.  I am trying to create a form to ask a set of questions and then I want to be able to output a set of answers based on the responses of the visitors.

With so many different possible languages to use, what would be the prefered one to use for this function?  Also, how would I go about making said program interact properly on my Intranet.  I am creating my pages with Front Page 2003 and I am quite familiar with HTML.  Thank you!
OCUWAsked:
Who is Participating?
 
Adam314Commented:
What part of them is not working  properly?
You should use whatever language you are familiar with, or would like to learn.  Perl is a popular language for web development.
0
 
TintinCommented:
What errors (if any) do you get when you try to run the CGI scripts?

Please note that there are a lot of very badly written Perl/CGI scripts out there that you can download.  If you're not familiar with Perl, it can be difficult to establish whether it is well written or not.

A big red warning flag is if the script doesn't have:

use strict;
use CGI;

it usually means it is poorly written.

What programming languages are you familiar/comfortable with?  Remember that CGI scripts can be written in any programming language.

Additionally, you may want to consider ASP (which is mostly commonly written with VB) or PHP.
0
Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
OCUWAuthor Commented:
The error that I am receiving is not necessarily an error at all.  What is happening is the following.

I have a cgi script that I have written using perl which contains the following code within, test.cgi:

#!c:/Perl/bin/perl.exe
print "Content-type: text/html\n\n";
print "<html>This is a test</html>";

When I save and try to preview this in my browser I see the entirety of the script, where, if I am correct, I should only see "This is a test".  Does this sound wrong overall to you?

I am decently familiar with VB, I have not used it in a while, but I have a good foundation and grasp of the language.  I have also worked with C and C+
0
 
TintinCommented:
You don't have a Perl problem, you have a CGI setup problem.  If you see the contents of a CGI program, it means the webserver hasn't been configured correctly to handle CGI programs.

Do you administer the webserver?

If you are familiar with VB, then ASP may be a good option for you, but it is obviously limited to Windows servers running IIS.
0
 
OCUWAuthor Commented:
Yes, I administer the Web Server, however I have never actually done anything with CGI or PERL before this.  I have been searching the internet to no avail.  Can you perhaps explain to me what might be wrong on my server to be not allowing this?  I am running Windows Server 2003 and IIS.  Thanks again!
0
 
OCUWAuthor Commented:
So, having not used ASP before I just have a couple of questions there.

Do I need to configure CGI on my webserver if I am running ASP?
What DOES need to be configured in order to run ASP through my webpage?
ASP is coded right in with the HTML and therefore does not need to reference scripts which are created and stored elswhere within the site infrastructrue?

Thanks for all the help!
0
 
TintinCommented:
ASP is a similar technology to CGI, but totally independent, therefore CGI does not need to be enabled to run ASP pages.

See http://www.visualwin.com/ASP/ for enabling ASP.

You are corrected that ASP pages have VB embedded in the HTML.  This is very similar to PHP and in fact, Perl can be setup to do exactly the same thing, although it is more common to use Perl with CGI.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.