From jacobson@math-cs.cns.uni.edu Thu Jul 18 15:58:20 2002 Date: Thu, 18 Jul 2002 15:57:35 -0500 (CDT) From: Mark Jacobson To: 810-088-06@uni.edu Subject: PERL assignment, movies memories... Hi 088 students, Your first PERL assignment will be as follows: 1. You are going to print out an ORDERED list (numbered list) via the OL tag and the LI tag in HTML, according to the user of your web sites request. 2. Your web page will provide a FORM so that the user of the page can click a SUBMIT button and have their request processed by your PERL/CGI script program. 3. For the first phase of this assignment, your web application only has to provide the following capabilities: a. the user can select to see the movie names (film title) from all of the movies in the entire database. b. the user can select to see the movie names from just those movies that are category Comedy. c. the user can select to see the movie names from only the movies of category Drama. d. the user can select to see the movie names from just those records that are from category Action/Adventure. 4. What is the format of the records from the moviestabsplit.txt file that you downloaded or transferred to your account? The first line of that file consists of these 5 field names from the original Access Query created table. It was exported as Tab separated fields, so there are 4 tab symbols hidden on every line of the moviestabsplit.txt file. 0 1 2 3 4 famousLine film LeadActor LeadActress Category 0 1 2 3 4 5. As you can see from the format, your only concern is with the 2nd field and the 5th field. The 2nd field, film, is the name of the movie. It has index 1, if you do the @movieRecord = split (/\t/, $rec); The 5th field, Category, has index 4. After you do something like: open (MOVIES, "moviestab.txt"); $rec = ; @record = split (/\t/, $rec); Here would be what @record looks like, and $record[1] is film and $record[4] is Category 0 1 2 3 4 ------------------------------------------------------------------- | famousLine | film | LeadActor | LeadActress | Category | ------------------------------------------------------------------- 6. You can get started on this CGI program right away. Lets make it due on Tuesday by 10 p.m. Please have questions ready about it to send to me or ask me in class before Friday's or Monday's class sessions. Send me the URL when you get it working, and turn in a prinout of the .cgi program under my door or in class. The best way to get a nice prinout: enscript -2r -dwrt112 myMoviesAssign1.cgi or enscript -2r -dwrt339 myMoviesAssign1.cgi Do NOT print it this way UNLESS YOU ARE WORKING IN THE COMPUTER LAB WRT112 or WRT339!!!! Do NOT print unless you are there. Include a comment line or two in your PERL .cgi file that mentions your name as the author: # Written by: Your Name # Due date: Tuesday, July 23rd. 7. This email note will be posted also at: http://www.cns.uni.edu/~jacobson/c088.html and http://www.cns.uni.edu/~jacobson/088/classes.html