Perl Data
-
Two data types: numbers and strings.
-
Both saved in the same type of variable, but surround strings with single
or double quotes.
-
Single quotes have a different meaning than double quotes. We'll
get to that later.
-
Similar to JavaScript
-
Constants and Variables
-
Constants do not change. Also called literals.
-
Variables do change.
-
Variable names are similar to JavaScript: use alphanumeric characters and
the underscore only.
-
A difference from JavaScript: Perl variable names
always begin with $, @, or %, depending on type!
-
More to come on this.
Scalars, Arrays, Hashes
Home