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/06/12 06:29] 176.78.89.95 old revision restored (2013/09/15 03:01) |
notes:perl_cheat_sheet [2026/06/13 20:45] (current) 37.122.190.32 old revision restored (2026/05/23 12:38) |
||
|---|---|---|---|
| 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 93: | Line 91: | ||
| print "It was $_ that I saw!\n"; | print "It was $_ that I saw!\n"; | ||
| }</ | }</ | ||
| - | * '' | ||
| - | print sort <>; | ||
| - | * C-like printf function %g for number auto-format, | ||
| - | my $format = "The items are: | ||
| - | printf $format, @items; | ||
| - | printf "The items are: | ||
| - | </ | ||
| - | * Filehandles can be barewords (upper-cased) or variables. Special filehandles are : STDIN, STDOUT, STDERR, DATA, ARGV, and ARGVOUT .<code perl> | ||
| - | open BEDROCK, '> | ||
| - | open LOG, '>>: | ||
| - | open BEDROCK, '>: | ||
| - | binmode STDOUT, ': | ||
| ===== User Subroutines ===== | ===== User Subroutines ===== | ||