stupid question II

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.
LVL 5
scrapdogAsked:
Who is Participating?
 
cheekycjCommented:
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
 
cheekycjCommented:
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
 
scrapdogAuthor Commented:
Adjusted points to 30
0
 
scrapdogAuthor Commented:
Excellent.  Thanks!
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.