This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
|
notes:perl_cheat_sheet [2026/11/01 08:14] 100.6.3.96 old revision restored (2026/09/23 04:35) |
notes:perl_cheat_sheet [2026/11/03 15:51] (current) 216.73.217.9 old revision restored (2026/11/02 18:14) |
||
|---|---|---|---|
| Line 12: | Line 12: | ||
| * "use strict;" | * "use strict;" | ||
| * Comments start with # (no block comments) | * Comments start with # (no block comments) | ||
| - | * Parenthesis are optional unless part of syntax. | ||
| Line 24: | Line 23: | ||
| * When a scalar is interpreted as a boolean, the following are //false// : 0, ' | * When a scalar is interpreted as a boolean, the following are //false// : 0, ' | ||
| * !! is a handy shortcut to convert any scalar to 0 or 1 (to represent a boolean) | * !! is a handy shortcut to convert any scalar to 0 or 1 (to represent a boolean) | ||
| - | * Variables have value '' | ||
| - | * '' | ||
| - | ===== Lists and Arrays ===== | ||
| - | |||
| - | * A list is an ordered set of elements (each of which is a scalar value), starting with position 0. | ||
| - | * An array is a variable that stores a list (separate namespace from scalar variables). | ||
| - | * To access an element of an array - '' | ||
| - | * Index of last element is in '' | ||
| - | * Negative array indices wrap around (only once) so -1 refers to last element. | ||
| - | * | ||
| ===== Numbers ===== | ===== Numbers ===== | ||