- log-in to sunburst
enter user name and password
- cd www (change directory to your web directory)
- mkdir todaysdemo (create new directory)
- chmod 755 todaysdemo (change permissions)
- cd todaysdemo (change directory)
- display the cgi-lib.pl in netscape and
copy to clipboard
- back to the telnet to sunburst session
- pico cgi-lib.pl (edit new file)
- paste (from menu - the file in the clipboard)
- control-x (save and exit)
- chmod 700 cgi-lib.pl (change permissions to file)
- pico add2.html
-
- chmod 755 add2.html (change permissions)
- view in netscape
- pico add.pl
- #!/usr/local/bin/perl
push(@INC,"/usr/local/etc/httpd/cgi-bin");
require("cgi-lib.pl");
&ReadParse;
$crlf="\r\n";
$number1=$in{'field1'};
$number2=$in{'field2'};
$total=$number1+$number2;
print "content-type: text/html$crlf$crlf";
print "results of input";
print "the total of $number1 and $number2 is $total";
- chmod 755 add.pl
- add.pl field1=3 field2=8
- pico add.html
-
sample cgi-bin
Add two numbers together