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/09/13 23:43] 45.171.130.194 old revision restored (2026/06/03 01:37) |
notes:perl_cheat_sheet [2026/09/14 05:19] (current) 185.11.17.58 old revision restored (2026/08/03 08:07) |
||
|---|---|---|---|
| Line 13: | Line 13: | ||
| * Comments start with # (no block comments) | * Comments start with # (no block comments) | ||
| * Parenthesis are optional unless part of syntax. | * Parenthesis are optional unless part of syntax. | ||
| + | * '' | ||
| ===== Numbers ===== | ===== Numbers ===== | ||
| Line 82: | Line 83: | ||
| * Read a line of input - '' | * Read a line of input - '' | ||
| * '' | * '' | ||
| - | * Assigning < | + | * Assigning < |
| + | * Loop over input ($_ can only be used in this specific case) <code perl> | ||
| + | print "I saw $_"; | ||
| + | }</ | ||
| + | * '' | ||
| + | * ''<>'' | ||
| + | chomp; | ||
| + | print "It was $_ that I saw!\n"; | ||
| + | }</ | ||
| ===== User Subroutines ===== | ===== User Subroutines ===== | ||