home -- outline -- lectures -- assignments -- discussion -- tips -- links -- | |
| |
Here is some useful information to use the SAMBAR server for testing
your Perl program on Windows 95/98 machines. First of all just a
reminder that you do not need the SAMBAR server, you can just put Perl
programs directly on the classes machine and they will work fine. But it
is easier to test your programs if you can run them on your PC. First download the program from the Sambar Home Page and install it like any other window program using the default setting for directories. I recommend using the Sambar 4.1 Production Server. Using Notepad edit the file c:\autoexec.bat. Add the following line of code to the end of that fileset
path=c:\progra~1\sambar41\perl;%PATH% Save the file and reboot the computer. Suppose you've written a Perl program test.pl and you have saved it in the c:\work directory. You run it this way: Open a Dos Box (Start->Programs->MS-DOS Prompt). Type in "cd c:\work". To run the program type "perl test.pl". If you want to test it as an action for a form do the following. Start the Sambar Server (Start->Programs->Sambar Server 4.1->Sambar Server 4.1) and click "Hide". Put the program "test.pl" in the "c:\Program Files\sambar41\cgi-bin" directory. In the form tag use action="http://localhost/cgi-bin/test.pl". |