Here are some things which would be good to know for the first exam.
You should also look at the
practice problems.
- Basic Data Structures.
- Know how to create strings using
"
, '
,
q
, and qq
.
- Know how variables are interpolated into strings.
- Know how
$
, @
and %
identify scalars, arrays, and
hashes respectively.
- Know how to subscript arrays and hashes.
- Know how to find the maximum subscript of an array.
- Know how to use the array operations such as
shift
.
- Know how list assignments work, including mixing lists and arrays.
- Know how to get the keys out of a hash.
- Know what
@ARGV
and %ENV
are.
- Remember that the C/C++/Java
++
and --
operators, in prefix and
postfix forms, are still here to haunt you.
- Know what
$_
is, and what is used for.
- Control Structures
- Understand the
while
, for
and foreach
loops.
- Know the
last
, next
, and redo
statements, and how
they differ.
- Understand how to use
shift
with while
.
- Know how to use
die
.
- I/O.
- Know how to read and write standard input and output.
- Know what
chomp
is for.
- Know how to open files with
open
, for reading or for writing.
- Know how to test files with the
-x
operators
(-e
, -x
, etc.)
- Know how to print using a file handle.
- Know how to read using a file handle: The
<FI>
notation.
- Functions.
- Know how to create a function (perl
sub
).
- Know how to create local variables with
my
(and that
other references are global).
- Know what
@_
is.
- Know how parameters are passed, and how a
sub
can use them.
- Know that parameter lists are flattened into a single
list before being sent, merging everything into one array.
- Be able to understand and create patterns. Here are some
particular things to concentrate on.
- Know what the
=~
and !~
operators do.
- Know how to create and use pattern matches and pattern replacements.
- Know how to use at least the following pattern operators:
*
, +
, ^
, $
, {}
, []
, .
and \s
.
- Know how to
^
behaves in and out of []
.
- Know how to use parentheses to capture a portion of a match
into
$
n variables.
- Know that patterns interpolate variables.
- Know what to do with the
system
call.
- References, packages, and modules.
- Know how to create a reference to an existing variable,
and how to use a reference.
- Know how to pass references as parameters, and how to use them.
- Know how to create a package, and how to create a module.
- Know what a blessed reference is, and how to create one.
- Know how a method call of the form
$r->f(x)
, for
a blessed reference $r
, is translated.
- Know how to create objects in perl.