Before this page
See the advice for a novice first, where you make compulsory changes on the first line (path) and the basic set up for the url, directory, etc.
#!/usr/local/bin/perl

################
# basic set up #
################
$basurl = "http://your_url/";
$bbs = "http://your_url/bbs.cgi";
$setup = "http://your_url/setup.cgi";
$basdir = "/your_directory/";
$addrss = 'nobody@visitware.com';
$smpath = "/usr/sbin/sendmail";
$seed = "za";
$sfile = "secret.dat";
$ifile = "index.html";
     :
     :

You may change other basic setting and HTML or a part of HTML (see the advice for a little learnt).

A little more than HTML
Now you can change something a little more than HTML.
############################
# create new board (check) #
############################
      :
      :
if ($data{'name'} eq "") {$redo1 = "ID is missing.<br>";}
      :
setup.cgi only.
The above sets an error message such as ID is missing. when the submission is not complete. Ten-odd error messages, from $redo1 to $redo6, parade one behind another. You can change what comes within double quotation marks for each variable, for example $redo1 = "Your ID, please.<p>";.

"sendmail"
You can change mail notices, too. Perl utilizing "sendmail" sends you and the new user mails when a new board is created.
#############################
# create new board (action) #
#############################
     :
     :
### mail confirmation start ###
## new to user ##
     :
     :
To: $data{'mail'}
From: $addrss
Reply-to: $addrss
Subject: Welcome new Board-Master (keep this record)

Dear new Board-Master,

Just in case you forget your registration.

Your ID: $data{'name'}
Password: $data{'pswd1'}
MessageBoard url: $basurl$udir

Administrative work (deleting inappropriate articles) can be made from
$bbs

To modify or delete your MessageBoard
$setup

Thank you.
     :
     :
## new to admin ##
     :
     :
To: $addrss
Subject: $newbd

User ID: $data{'name'}
User E-Mail: $data{'mail'}
Password: $data{'pswd1'}
Homepage url: $data{'hurl'}
Board url: $basurl$udir
Title: $data{'title'}
Description: $data{'desi'}
     :
     :
### mail confirmation end ###

And also when an old one is deleted.
####################
# delete old board #
####################
     :
     :
### mail confirmation start ###
     :
     :
## delete to user ##
     :
     :
To: $mail
From: $addrss
Reply-to: $addrss
Subject: Your message-board has been deleted

Dear $name,

Your message-board
$basurl$udir
has been successfully deleted

Thanks
     :
     :
## delete to admin ##
     :
     :
To: $addrss
Subject: Deleted message-board ($udir) $notc

     :
     :
### mail confirmation end ###

setup.cgi only.
To, From, Subject, etc. are standard mail headers. You can have Cc or Bcc or whatever you like here as far as they conform to the mail protocols. Please note, you must have one blank line between the mail header and body to separate them. In the above case, a blank line below Subject:. You can change the bodies any way you like. The last mail (to you) have a blank line at the end but does not have body. Still it can reach you.

If you do not want to send mail notices, you can delete above lines from ###mail confirmation start### to ###mail confirmation end### for either or both of "create new board (action)" and "delete old board". Or you can stop each mail ## new to user ##, ## new to admin ##, ## delete to user ## or ## delete to admin ## individually by deleting lines under each heading.


If you are testing your CGI before uploading it to the server, you need "Web-Server Program", "Perl" and "Browser." I think you already have a browser, IE or NetscapeNavigator or something. A CGI does not work without properly placed at a server. (Though you can check its syntax by Perl alone without setting up server. A script could malfunction even if syntax is ok.)

I assume you are not really starting server business. You are just testing CGI and never make outside connection while server program is running. Then you are the only user and you can set everything open and accessible (permission 777, an easy choice). If in doubt, disconnect the telephone line. If your computer is connected to a local-network, or intra-net and can not be, or should not be disconnected, ask your network administrator first. There may be something you can do technically but prohibited by regulations. Depend on how you ask, the system administrator can be your asset or liability.

Latest Mac and Windows come with a web-server program. Consult with the manual. Find Personal WebSharing (for Mac) or Microsoft Personal Web Server (for Windows). You may download much fancier program from internet. A lot of free-(or share-)wares are availably there.

I myself used Mac with Personal WebSharing. TCP/IP (you find it in AppleMenu if you never modified the system) setting is: select LocalTalk (or AppleTalk or MacIP); IP address is manually sat 192.168.1.1; Subnet Mask (or router) is 255.255.255.0; Gateway is 0.0.0.0. Using AppleTalk means AppleTalk must be on. At least it works for me.

Next, you run a server program. Select a folder (or directory) to be shared via WebSharing. It can be advised that the folder is placed directly under a hard-disk. (Apple says after 5th subdirectory it may malfunction.) You may select your homepage, too. I hope all this wouldn't confuse you. I needed one week till the server up and running. Check internet, there are many web-sites advising this or that.

Run a browser and type "http://192.168.1.1/" (or your IP address) in the location window. If everything is ok, you see the listing of the folders and files in the folder you've selected for WebSharing or if you have a homepage there, the homepage. Depend on setting, and if you do not have the homepage, you may be warned "file not found" etc. It's ok. You add a name of file which you know there. For example "http://192.168.1.1/file_name.html" etc. But if you see the message "the network connection was refused by server 192.168.1.1", something must be still wrong.

Once you make your computer virtual server, have Perl somewhere within it (within the directory selected to be the server). You can download the latest Perl for your O/S; the first place to see is http://www.perl.com/CPAN/. Set the "Path" of the CGI script accordingly. This is must. Other changes are optional. And even if you want to make optional change, see if the CGI works in its default setting at first.