Perl for NT

Where can I find a *GOOD* perl compilier for NT that I can use for my cgi scripts.  Not sure what kind of web server we have here, and I don't have access to that knowledge.  (People who knew it are gone.)  I do have full control over a cgi-bin directory, and it supposedly was made "executable" via the web server.

Not only do I need to know where to find the program, but I also need to know how to set it up.

One more pre-req for this question:  you must have at the very least set up this program to run properly, and bonus points if you are currently running it.
TooStupidAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

jhanceCommented:
I use and recommend the port of Perl from ActiveState:

http://www.activestate.com/software/Perl_for_Win32.htm

It's about as complete as a Windows port of PERL can be.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
TooStupidAuthor Commented:
OK, I got the program, downloaded it and all the FAQ's that go with it, installed it, etc.

Do you have a "Hello World" script that I can verify the install with?  How do I call this script from my HTML file?  Can I test it out locally before using my server?  (i.e. loading the file locally in Netscape and having the script execute.)  How?


0
TooStupidAuthor Commented:
Added 50 more points...
0
PMI ACP® Project Management

Prepare for the PMI Agile Certified Practitioner (PMI-ACP)® exam, which formally recognizes your knowledge of agile principles and your skill with agile techniques.

jhanceCommented:
1) A PERL "Hello World" script:

print "Hello World\n";

2) How to run this script from your server depends on what server it is.  Assuming it's Windows NT/IIS, this is probably the easiest:

Create a PERL script called "welcome.pl" like this:

print "Content-type: text/html\n\n";
print "<HTML>\n";
print "<CENTER>This is a test!\n";
print "</HTML>\n";

Now create an MSDOS BAT file RUNSCP.BAT to run the script in your CGI-BIN directory that looks like this:

@ECHO OFF
C:\PERL_DIRECTORY\PERL C:\PERL_SCRIPTS\WELCOME.PL

Now you can run the script from your browser like:

http://www.myserver.com/cgi-bin/RUNSCP.BAT

3) You can't run a CGI-BIN program locally from your browser without a web server.  If you need to run locally, use the MS Personal Web Server for Win95 or the PWS for NT Workstation.
0
TooStupidAuthor Commented:
Got the welcome.pl script.  I can run it from the DOS prompt just fine and it prints everything OK.

Created the batch file.  Put everything on the server.  Tried calling the batch file from my server.  Netscape prompted me to "Save File As".  So, next, I tried accessing the welcome.pl script.  I get prompted to save.  I put
#!Perl\bin\perl
(path to perl.exe) in the header, and still get prompted to save it.

I found out that they (MIS) are using the web server that comes with Windows NT 3.51.  There is no option for changing it (no one to support it), and nobody knows the name of the program.  (Talking to them is like talking to a brick wall, sometimes.)

So, how would I call this from a form to make it write to a window?
0
TooStupidAuthor Commented:
I guess that is my next option since I can't get the thing to run as is.  BTW:  I have gotten a hit counter to run, but it is a compiled executable and I call it using <IMG SRC="counter.exe?Count_Name">.
0
TooStupidAuthor Commented:
I compiled the welcome.pl as an executable in basic (changing code as needed, of course.)

When I call via the location, ie http://servername/cgi-bin/welcome.exe, I get prompted to save it.  However, when I call it via the location and I pass it a dummy parameter, ie
http://servername/cgi-bin/welcome.exe?dummy, I get the message
HTTP/1.0 500 Server Error (The handle is invalid. )

Does this help out any?
0
jhanceCommented:
Can you tell me what web server you are using?  There was no web server available from Microsoft for NT3.51 so it must be a 3rd party program.  If you are getting a "Save As" option when trying to run a cgi-bin program it's usually because the server doesn't have the directory that the script is in set as an "executable" directory OR the type of the executable file (i.e. .BAT) is not set as an executable file.
0
TooStupidAuthor Commented:
Can't tell you what web server is.  MIS doesn't know, won't take the time to figure it out.  However, I have made a little headway.  Here is what I'm doing now to call the batch file:
http://servername/cgi-bin/test.bat?

From this, I get

CGI Error

The specified CGI application misbehaved by not returning a complete set of HTTP headers. The headers it did return are:

E:\httpd\htdocs>cgi-bin\Perl\bin\perl.exe cgi-bin\Perl\Scripts\welcome.pl

I get this mainly because I removed the @echo off from the batch file.
0
TooStupidAuthor Commented:
Note that if I get the path wrong, I get a file not found error.
0
TooStupidAuthor Commented:
There are a couple of options at this point in the question:

I can award you the 150 points for pointing me to the Perl program, and then ask a question on how to get it running, or
I can just add more points to your score if you can get it running.
0
jhanceCommented:
I'm afraid I'm not being much help without knowing more about the server software and it's environment.  There are any number of web servers that could be used here so we're just shooting in the dark at this part of it.  Who is MIS anyway.  Are they an ISP?  If so, what is their web site address?  Perhaps their server will identify itself.
0
TooStupidAuthor Commented:
MIS: Managed Information Systems.  Take care of most of the computer problems at work and also manage the network and the intranet.  BTW: They really suck.  Bunch of clueless, arrogant SOBs in my opinion (at least where I work, anyway.).

Did I mention that they suck?  Network crashed a little while ago and everyone lost a ton of work, because they couldn't figure out how to get their tape backup working properly, and didn't tell anyone.  Their latest big crash involved the mail server.  No email for two weeks!  Didn't bother to let anyone know about that  one either.

How did I get on the cgi end of all this?  I'm one of the only people in the company who can actually write HTML w/o the use of a "web editor".  Total amazement was written all over their faces when they found out.  Granted, I'm not an expert at HTML, but I manage to do what I need to do.

OK, enough venting.

I'll leave this question open for a while so other experts can take a look at it...maybe get a different opinion.  If I get an answer (posted as a comment) that works for me, I'll grade this question for jhance and then ask another question for the person who made it all happen for me.
0
mararCommented:
Jhance,may be we can write a small program in C or Perl to get the header from the server. It will usually tell the name of the server, right? Once we get the name of the server, we can proceed.

I can help, if it is IIS. With the compuserv also I may be(75%)able to.
0
TooStupidAuthor Commented:
As promised, I'll ask another question--moving in the right direction.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Scripting Languages

From novice to tech pro — start learning today.