Class 26 review (07/17/2002)

Right mouse click on the following hypertext links in order to get a popupmenu and be able to download the files to your Z: drive and home directory on cowboy.cns.uni.edu, or your own computer if you are not working in Wright Hall. Two versions of the movies database.
  1. Taking a slice of the localtime() array returned result.

  2. Movies database stored in tab separated fields. Sorted into descending order, I think???

  3. Movies database stored in tab separated fields. Sorted by movie quote, into ascending alphabetical order.

  4. Movies PERL database code, which we typed in and modified in class. First exposure to array slicing as we modified the example handout to be an ARRAY SLICING example.
          $str = "0,1,2,3,4,FIVE,6,7,8,9,TEN,11,TWELVE,13,14,15,16,17,18";
          $str .= ",19,20,TWENTY-ONE,Catch 22";
    
          @a = split (/,/, $str); 
          @b = @a[2,5,7..12,18];
          print "\nHere is the slice taken spec: [2,5,7..12,18]\n\n";
    
          foreach (@b)
          {
             print;
             print "\n";
          }
    

    [jacobson@math-cs 088]$  perl tryPERLslices.p     OUTPUT SHOWN HERE
    
    Here is the slice taken spec: [2,5,7..12,18]
    
    2
    FIVE
    7
    8
    9
    TEN
    11
    TWELVE
    18
    

  5. IP numbers, web page access counters, localtime function, as well as split. Note how this page keeps track of whether you visited before, and does NOT add to the count of visiters, if you come back or REFRESH or RELOAD within a few minutes of your most recently recorded visit.