Fall Semester 2006

Lab Notes Three: Password protected directories.
First of all in this lab you need to show two things:

  1. show that you have a properly defined crontab file
  2. show what your default editor is, and explain whether you had to change it or not

You also need to make sure you have your

hello, ..., helloFive
conspicuously indexed somewhere on your server's home page.

In this lab you will be setting up a password protected directory.

You will be using these settings to hand in your assignments.

Follow Chapter 6 from the text.

Notes in the past used like this. Use them (but adjust them to match the present semester).

In lab you will also develop this program:


use CGI; 

$q = new CGI; 

print $q->header, $q->start_html; 

$message=$q->param('message'); # done automatically by PHP 

if ($message) {

  @a = split(' ', $message); 
  $first = splice(@a, 0, 1); 
  $message = join(' ', @a); 

  $anotherMessage = "You are looking at: " . $first; 

} else { 
  @a = ("one", "two", "three", "four", "five", "six"); 
  @b = ();   

  while ($#a >= 0) { 
    $i = int(rand($#a+1)); # randomly choose one element in @a 
    splice(@b, 0, 0, $a[$i]); # put it on the left of @b 
    splice(@a, $i, 1); # ... and take it out from @a 
  $anotherMessage = "The game has just (re)started. The deck is shuffled."; 
  $message = join(' ', @b); 

print qq{
    $anotherMessage <p> 
    Current list: ($message) <p> 
    <input type="submit" value="Proceed"> 
    <input type="hidden" name="message" value="$message"> 

print $q->end_html;
This, and the program developed Thu in class, are all you need for Homework Two.

Last updated on Sep 12, 2006, by Adrian German for A348/A548