NEIU CGI and Perl Workshop Web Page: Assignments

This is a support page for Northeastern Illinois University's Enhancing Teaching and Learning with Technology "CGI Workshop."

Assignments

Scalars

  • Create scalars
  • Assign a value to a scalar
  • Performing math operations on scalars
  • Connecting (or concatenating) strings

    Arrays

  • Create an array
  • Get items from an array
  • Splitting a scalar into an array
  • Modifying all the members of an array

    Hashes

  • Create an hash

    Subroutines

  • Using a subroutine

    Conditionals

  • A single conditional
  • A multiple conditional
  • The unless conditional

    Forms

  • Survey which sends email to you
  • Survey which writes results to a page
  • Survey which sends results to a file

    Files and Directories

  • Reading data from a file
  • Reading data from a file referenced by a query string
  • Reading the contents of a directory # 1
  • Reading the contents of a directory # 2
  • Combining some of these to read a directory, then show the contents as links to them (i.e. read the files)

    Hidden Files and Cookies

  • Storing collected data in a hidden field

    Printing

  • Formatting output with HTML
  • Printing several lines at a time

    Regular Expressions

  • Finding out if a field has something in it New
  • Finding out if a field is empty New
  • Finding a match in a string New
  • Finding and replacing a match in a string New
  • Seeing and using a match. New
  • Splitting a value. New

    The flist.cgi script which displays all of these scripts

  • Ron Pateman's flist.cgi script
    Credits:
  • These assignments were given to me by Ronald Pateman, who has graciously mentored me in my learning of Perl. They also use Ron's flist.cgi script to display all scripts and html pages.
  • Unless noted, the scripts for the assignments were based on Perl and CGI for the World Wide Web: a Visual QuickStart Guide, a wonderful book I highly recommend.
  • The definitions and some of the scripts are from CGI Programming 101.
  • Back to NEIU CGI and Perl Workshop Web Page