Solved

stupid question II

Posted on 1998-12-09
4
164 Views
Last Modified: 2010-03-05
Now that I have the tutorials (please see original "stupid question"), what all do I need to begin writing perl scripts?

I am using Windows 98, but I am not sure what OS the server I will be uploading to is running.  I have very little info about the server...does it need a special program running in order to utilize perl scripts?  Or do you upload an executable?  Like I said I know very little about perl so these questions are going to appear to be very stupid to the likes of b2pi and ozzy and the other perl gurus.
0
Comment
Question by:scrapdog
  • 2
  • 2
4 Comments
 
LVL 19

Accepted Solution

by:
cheekycj earned 30 total points
ID: 1206797
You need the following:

1. Editor-  You can use any text editor to create the scripts-  notepad, etc.

2. Perl Compiler(for win32)-  Download from http://www.activestate.com/pw32
the compiler there.  Once you download it - Install it.

3. To test the files locally you need a server on your local machine.  Win98 comes with
Personal Web Server that should work or you can download a free webserver from the
following:
http://www.sambar.com  (my preference because its very easy to use)
http://www.apache.org    (most widely used)  
http://www.omnicron.ab.ca/httpd/index.html  (a nice and small server)

once you have the server up and running and set it to run perl (should be in the server docs)
You should be good to go.

couple of tips.
to debug/run a script you have to do the following
either put path to perl in you autoexec.bat or do the following to compile/run:

<complete path to perl.exe> <complete path to perl script file>

Also you will need the #<path to perl.exe on your computer>  as the first line
of each script.

<<<the complete other way is that if your ISP allows you to do cgi scripting you can
write your scripts in notepad and upload the files to the server and then run perl. but
this is a long and tedious way.>>>

Happy programming!

Hope this helps

CJ
0
 
LVL 19

Expert Comment

by:cheekycj
ID: 1206798
Also to upload the scripts onto your server (once you have them working locally)
you will probably need to make the following modifications to your script files (extensions
cgi or pl)

First you will use your ISP's perl compiler (Its hard to find an ISP that doesn't have one)
to do that change the first line to the location of perl on your server rather than your local PC (ask the ISP about the perl location path)

probably change some of the paths in your scripts itself- if you are using any mail
programs or unix date commands.

Also when you ftp the files (cgi or pl files) to your cgi-bin directory on your server make sure you
ftp as ASCII only (not automatic) so it doesn't ftp the carriage returns that PC's add
on at the end as Perl in unix doesn't like them.


One last thing-  when you are using notepad or whatever to create the scripts save them
as-  .pl  or  .cgi

CJ
0
 
LVL 5

Author Comment

by:scrapdog
ID: 1206799
Adjusted points to 30
0
 
LVL 5

Author Comment

by:scrapdog
ID: 1206800
Excellent.  Thanks!
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

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…
Many time we need to work with multiple files all together. If its windows system then we can use some GUI based editor to accomplish our task. But what if you are on putty or have only CLI(Command Line Interface) as an option to  edit your files. I…
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…

809 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