assigns values to a variable; operand to the left of the sign is the name of the variable, and the operand to the right is the value stored in the variable
Back
Does Perl have a Boolean type?
Front
no
Back
Front
newline character
Back
;
Front
required to end a Perl statement
Back
=
Front
lines starting with these are interpreted as the start of a section of embedded documentation (pod - plain old text)
example:
=begin comment
This is all part of multi line comment.
You can use as many lines as you like.
These comments will be ignored by the
compiler until the next =cut is encountered.
=cut
Back
#
Front
starts a comment
Back
$
Front
called scalars; they contain a single string or numeric value; perl variable must start with one of these
Back
Is Perl case sensitive?
Front
yes
Back
%
Front
called hashes; contain (key, value) pairs efficiently accessed per key
Back
""
Front
used to encapsulate a string to be printed, and it allows replacement of variables and special characters (like ) inside the string; also known as interpolation (because you place it in between them); double quotes also allow the variable named x to show its real value of $x
Back
to refer to a single element of a hash, the variable name must start with a ___ followed by the key of the requested element in ___
there are other ways, but you can specify the key value pairs with the key => value syntax
Front
1. % 2. {}
Back
=cut
Front
all subsequent lines of "=" until the next of these are ignored by the compiler
example:
=begin comment
This is all part of multi line comment.
You can use as many lines as you like.
These comments will be ignored by the
compiler until the next =cut is encountered.
=cut
Back
'
Front
prevents variable value replacement; with single quotes, the value of $x is not replaced '
Back
to refer to a single element of an array, the variable name must start with a ___ followed by index of the element in ____
index of the first array element is 0
Front
1. $ 2. [ ]
Back
@
Front
called arrays; contain a randomly accessed ordered set of values; perl variable must start with one of these