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 10:00] 114.119.135.121 old revision restored (2026/05/23 13:29) |
notes:perl_cheat_sheet [2026/06/13 14:55] (current) 47.245.90.216 old revision restored (2026/06/04 13:11) |
||
|---|---|---|---|
| Line 92: | Line 92: | ||
| 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 ===== | ||