CIS 33A Programming in PERL
Lab instructions for Active Perl in windows
This page may need to be updated
These instructions are for Active Perl in windows.
Read them, then you can adapt them to work in various ways in windows or linux.
Create your program
- Log into your windows account on Puma.
-
Double click on My Documents
In the menu, select - Tools - Folder Options - View tab
Uncheck: Hide extensions for known file types - OK
-
In the My Documents folder:
Right click - Select new - select text document
-
Type a comment with the heading,
similar to the following but with your
correct first name, last name, CIS 33A, lab letter, and problem number:
# Tommy Atkins CIS 33A Lab X Problem 1
- Type the file name of the program and a description of the program:
# LabXProblem1.pl
# Prints Hello World
-
Type the program:
print "Hello world" ;
-
In the menu select - file -
Save as: - Save as type: All Files - LabXProblem1.pl
Execute your program
-
From the lower left corner of the screen select -
start - Accessories - Command prompt
-
Type:
perl -w LabXProblem1.pl
Save your execution results
-
In the top left corner of the Command Prompt window,
select the small rectangle marked C:\ - select edit - mark
-
Drag the cursor over the execution results
-
In the top left corner of the Command Prompt window,
select the small rectangle marked C:\ - select edit - copy
-
In your program in notepad, at the end of the program, type:
# Execution results
-
After that, paste the execution results and put # space at
the beginning of each line
Resulting code, ready to hand in
Your program should now look like this:
# Tommy Atkins CIS 33A Lab X Problem 1
# LabXProblem1.pl
# Prints Hello World
print "Hello world" ;
# Execution results:
# Hello world
Different approaches
There are many variations on this approach, both in windows and Linux.
There is a handout sheet available in the laboratory.
Your book may have suggestions.
There are instructions for working on voyager from home.
Look at the home page for voyager:
http://voyager.deanza.edu