Questions about the exam

The format of the exam

  • The exam will consist of 20 short answer questions.
  • You will not be asked to recite facts, but instead you will be tested with respect to your understanding of the topics.
  • Although some Perl code may be shown in the exam questions, you should be able to answer the questions even if you have only PHP knowledge because the questions will not depend on specific Perl syntax.
  • If you are asked to write code in the exam, you can write it either in Perl or PHP.


  • Past papers: See the link on the module website.
  • What books to use for revision? There should be a few books about Perl, PHP in the library (eg the Learning Perl book). But I am not sure how you would use them for revision because they are more reference books than textbooks. I would probably recommend to go over some of the exercises again instead of reading lots of books.
  • Will we have to know the content of the various extra readings? You should know the concepts which were discussed in the extra readings. But you will not be asked to recall exactly what author X said in paper Y.

    What you can take with you to the exam

  • The exam is an open-book exam. You may use any book and any handwritten notes.
  • You should take the following with you:
  • You may NOT use electronic devices (e.g. laptops, calculators, mobile phones etc). If you require electronic devices because of a disability or other reasons, you need to obtain advance permission.

    Questions about the coursework

    The Search engine part

  • Formatting the results: The results from the search engine should be formatted in a manner that is useful for users. You can use a Google-like style or a different style - but it is for you to decide which style you use. Just printing "there were n results found" is obviously not as useful as providing some form of link back to the page or displaying the paragraph in which the result occurs.
  • Downloading the page that is to be searched: You can download the page and store it on your server.
  • Changing the page that is to be searched: If you want to change the page in any way (i.e. break it down, insert something, reformat), you can do that. As long as the search retrieves the same pieces of text as the original page, I don't care what you do to your copy of the page.
  • Funny characters on the page that is to be searched: There are some funny characters on the page (eg. &#60; and &#62; which display as < and >). You don't need to worry about them with respect to the search. I do not intend to use any difficult characters when I test your search for marking purposes. (But you may need to worry about strange characters with respect to security - see the lecture notes for week 6).
  • Boolean AND on the search form: if two words are entered then the search should default to evaluating the terms using Boolean AND. The user should not have to do anything to request Boolean AND because this should be the default. Thus users should not type "AND" or any other character to denote AND. The difference between this search and a phrase search is that users need to enter double quotes ("") around phrases.

    Hints for general problems with the webserver

  • Internal Server Error
    If you edit your CGI files using a Windows editor, the first line of your file must end in "-w" ("#!/usr/local/bin/perl -w"), otherwise you will get a server error. This is because Unix does not like the Windows newline character after "/perl"; Unfortunately, last year more complex CGI scripts with undefined variables ran very slowly with the "-w" option. On Unix, it may be better to not use the "-w".
  • No html pages or CGI scripts are viewable through the browser
    For some reason C&IT seems to occasionally reset permissions. Go to your home directory (the one above public_html) and type "chmod 711 .".

    Problems with Cookies

  • Cookies may be turned off by default in IE in the JKCC. To turn them on go to Tools/Internt Options/Privacy/Advanced Settings
  • From home: some students report that cookies may not work properly when they are using the scripts from home. This could be due to the firewall of the university.
  • It is a good idea to go to the directory where cookies are stored and check whether cookies are actually written. Note: this only works for non-session cookies. Session cookies are held in memory by the browser and are never written onto the harddrive at all.