How to run MacPerl

  1. Create a Folder Before you start working, create a working directory somewhere to keep your files--if you don't have one already--by selecting New Folder from the File menu of the Finder, or by typing command-n. This creates a new directory with the default name, untitled folder. Select the folder name and rename it to name of your choice.
  2. Find MacPerl: Open the hard disk that holds the lab-installed programs and see if you can locate a folder called MacPerl. It is likely to be in a folder called Programming. If you can't locate it, ask the lab staff for help.
  3. Start MacPerl: Start MacPerl by double-clicking on the camel-and-pyramid icon. When the program has come up, open a new file by selecting New from the File menu. Save the file under a name of your choice in your working directory. Perl files customarily have the file extension .pl. Your file could be called, firstScript.pl, for example.
  4. Start programming: Do the rite of passage: type
    print "Hello world!\n";
    
    into your file window. From the Script menu, select run your_file_name, or type shift-command-R. If a new window called "MacPerl" pops up and shows the "Hello world!" greeting, you've passed the test. Congratulations, you've become a Perl programmer.
  5. If you don't understand these instructions or have problems following them, see a TA immediately. If no TA is on duty in your hour of need, consult the Maclab staff.