Welcome to OptiPerl 5!

If you just downloaded OptiPerl, or you are new to CGI programming, read the following for a quick start.

Setting Up

1) If you don't already have Perl, download it. See Setting Up

2) Follow the directions at the above page, to install perl.

3) You are ready!
Basic Stuff
If you don't know much about how to use CGI scripts in your web page, here is a very brief introduction. There are many great sites on the internet for tutorials.
Make sure you have installed first perl as noted in Setting Up.
Let' s assume you want to create a web site with some forms. Do the following
1) Select "New html file" and enter the following.
<form action="cgi-bin/basic.cgi" method="GET">
Enter some text here:
<input type="text" name="text" size=30>
<input type="submit"><p></form>
This creates an input on your page for the user to enter text. Most web-editors allow you to create stuff like this automatically. Notice the GET method used here. When the user presses "Submit", the browser will call the URL:
http://127.0.0.1/cgi-bin/test.cgi?text=what_you_typed
Under the path you installed OptiPerl, you will find a folder "webroot" (like c:\program files\OptiPerl\webroot). Save your file there with the name "basic.html"
2) Select "New Script" and enter the following.
#!perl
print "Content-Type: text/html\n\n";
print "Hello from script! <p>";
print "$ENV{'QUERY_STRING'} <p>";
Save in "webroot\cgi-bin" as basic.cgi.
Now time to run. Make sure that you have a check-mark on "Server/Internal Server Enabled" and the root path under "Server/Internal Server Root" is "c:\program files\OptiPerl\webroot" (or accordingly where you installed OptiPerl).
Also make sure "Server/Run with Server" is checked too.
Go back to your html document "basic.html" pressing the tab in the editor and press "F9" to run.
You should see the html document in the web browser. Enter something in the text box and press "Submit"
You should see the result in a dynamically created html page. That's the basics!
If you get an error, please make sure you read about "Setting Up" in the help file.
3) Now to send this to an Internet server, you might need to change the first line (the location of perl on the web server). If your internet web server has cgi enabled with a cgi-bin directory contact your provider for what this line should be. OptiPerl's provides many ways to do this automatically.

OptiPerl's Help

Included with OptiPerl are the following to help you:

- OptiPerl's Help. After loading OptiPerl, we recommend reading the topics of OptiPerl's help (open from menu Help / Index). Also follow the tutorials in the corresponding sections.
- Perl Core Documentation. Includes all of perl's help for reading and context-sensitive lookup.
- Perl Modules and Apache Documentation. Included in registered versions of OptiPerl.

Examples

Included with OptiPerl are some examples of CGI programming. Explore the webroot folder to see these examples (from the book "Official Guide to Programming with CGI.pm" by Lincoln D. Stein - John Wiley & Sons, Inc.).