Solved

how to install Perl?

Posted on 1998-12-07
11
262 Views
Last Modified: 2012-05-04
I am learning Perl, I bought 2 books but I can't figure out how I install Perl on my computer. My OS is NT4.
Right now I can only test my scripts through my ISP server (unix) and it's boring because it doesn't really work like they explain in the books (where you are supposed to have Perl installed on your computer).

Can someone explain exactly in details what to do, I really start from scratch, have no compiler, don't know if I need one, don't know where I find one... the real beginner so please, be patient and nice with me.

Thanks
0
Comment
Question by:wirefram
  • 5
  • 5
11 Comments
 
LVL 5

Expert Comment

by:Christian_Wenz
ID: 1206772
first, try to download the Win32-Port of Perl, if you haven't already (http://www.activestate.com/pw32, the section with the "316 build").
Then, install a Web Server on your machine. I prefer OmniHttpd, a very small server. (http://www.omnicron.ab.ca/httpd/index.html).

Please leave a comment as soon as you've installed this.
0
 
LVL 5

Expert Comment

by:Christian_Wenz
ID: 1206773
forgot to mention: download the free edition of the server
0
 
LVL 84

Expert Comment

by:ozo
ID: 1206774
ActiveState build 316 was based on Perl5.003, The current version is 5.005
You don't need a Web Server to run Perl, but you need one to run CGI
0
Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

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.

 

Author Comment

by:wirefram
ID: 1206775
I have everything installed. Looks good (@#!). Waiting for the sequel.

Thanks.

0
 

Author Comment

by:wirefram
ID: 1206776
Hello

About explaining what I do next?

I downloaded all the stuff, can you give me the explanation for what I do now?

Thanks

0
 
LVL 5

Expert Comment

by:Christian_Wenz
ID: 1206777
well, after downloading and installing OmniHttpd and perl, the omnihttpd symbol should be in the lower right corner of your screen (in the system tray). Right-Click on it and select Properties.
In the tab Advanced, write the filename and path of the Perl executable (eg. I have E:\PERL\BIN\PERL.EXE)
Be sure that both Process Server Side Includes and Enable Perl CGI support are checked.
Now, launch Netscape and access page localhost/Test.shtml. At the bottom of this page, fill out the form and press "Submit Saying". What does the next screen display?
0
 

Author Comment

by:wirefram
ID: 1206778
??? I don't have Netscape but Explorer and I don't have a folder called "localhost".

when I downloaded Omnihttpd, it has installed a folder called "httpd" on my computer. Inside I have 5 folders named exactly like that "Cgi-Bin", "Cgi-Win", "HtDocs", "Icons" and "Logs"
with the same exact capital letters.

Inside "HtDocs" there is a file called "test.shtml" title: CGI and SSI test, with a bunch of fields tests to fill. When I look at the source I see:

<a href="/cgi-bin/minimal.pl">Click here to test</a>

and if it refers to the cgi folder located in "httpd\Cgi-Bin" it cannot work because it's not the exact same name.

Do I have to rename everything?

When I select Properties in omnihttpd, I have  2 choices, Web server Virtual settings and Default virtual settings, in Web server, the Process SSI and Enable CGI are checked.

Do I have the right stuff?




0
 
LVL 5

Expert Comment

by:Christian_Wenz
ID: 1206779
no, I don'T think you have to rename anything. "localhost" or "127.0.0.1" is the server name of the omnihttpd server. I recommended Netscape for viewing as my IE sometimes needs that I have an active online connection in order to access the (locally stored) localhost server files.

So just try typing http://localhost/test.shtml  in you web browser's location field and tell me what you see...
0
 

Author Comment

by:wirefram
ID: 1206780
As I didn't have much luck with Omnihttpd, I downloaded Apache 1.3.3 and I was able to set it up.

Thanks for your help.

A last (?) question, help me with so I can close the question and give you my points.


When I write a script, to run it I use the command prompt window, is there a way to run it somehow else?

Can I run it in my browser without having to write "print content text html"  on the script?

To make it short, can my script behave the same in my browser than in the command prompt window?

Thanks



0
 
LVL 5

Accepted Solution

by:
Christian_Wenz earned 50 total points
ID: 1206781
as I understand it, no, sorry. A browser needs a "Content-type" when displaying a file (as a browser is file extension-independent). However, I think a "Content-type: text/html" and two line breaks are not spoiling the output of your program too much.

0
 

Author Comment

by:wirefram
ID: 1206782
Thanks
0

Featured Post

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Remove Malware code from PHP file 6 90
Perl Script to read file contents, make changes, and build new file 7 120
perl getopt long help 34 71
Perl Versus AWK? 7 51
I've just discovered very important differences between Windows an Unix formats in Perl,at least 5.xx.. MOST IMPORTANT: Use Unix file format while saving Your script. otherwise it will have ^M s or smth likely weird in the EOL, Then DO NOT use m…
Email validation in proper way is  very important validation required in any web pages. This code is self explainable except that Regular Expression which I used for pattern matching. I originally published as a thread on my website : http://www…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…

856 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question