Kentaro Shirakata
argra****@users*****
2007年 7月 8日 (日) 00:42:34 JST
Index: docs/perl/5.8.8/perlcheat.pod diff -u /dev/null docs/perl/5.8.8/perlcheat.pod:1.1 --- /dev/null Sun Jul 8 00:42:34 2007 +++ docs/perl/5.8.8/perlcheat.pod Sun Jul 8 00:42:34 2007 @@ -0,0 +1,125 @@ +=head1 NAME + +=begin original + +perlcheat - Perl 5 Cheat Sheet + +=end original + +perlcheat - Perl 5 `[gV[g + + +=head1 DESCRIPTION + +=begin original + +This 'cheat sheet' is a handy reference, meant for beginning Perl +programmers. Not everything is mentioned, but 194 features may +already be overwhelming. + +=end original + +±Ìu`[gV[gvÍ Perl vO~OÌSÒ̽ßÌt@XÅ·B +SÄÉ¢ľyµÄ¢éí¯ÅÍ èܹñªA194 vfÆ¢¤ÌÍ +¼[ÅÍ èܹñB + +=head2 The sheet + +(`[gV[g) + + CONTEXTS ó zñ nbV + ³ø $Ï SÌ: @array %hash + XJ @zñ XCX @array[0, 2] @hash{'a', 'b'} + Xg %nbV vf: $array[0] $hash{'a'} + &Ö + *Ou XJl + l, ¶ñ, t@X, Ou, undef + t@X + \ t@X $$foo[1] Í $foo->[1] + $@%&* tt@X $$foo{bar} Í $foo->{bar} + [] ³¼zñref ${$$foo[1]}[2] Í $foo->[1]->[2] + {} ³¼nbV ref ${$$foo[1]}[2] Í $foo->[1][2] + \() refÌXg + l vs ¶ñ N + ZqÌDæÊ = = perl.plover.com + -> + . search.cpan.org + ++ -- == != eq ne cpan.org + ** < > <= >= lt gt le ge pm.org + ! ~ \ u+ u- <=> cmp tpj.com + =~ !~ perldoc.com + * / % x ¶@ + + - . for (LIST) { }, for (a;b;c) { } + << >> while ( ) { }, until ( ) { } + ¼Ot«PZq if ( ) { } elsif ( ) { } else { } + < > <= >= lt gt le ge unless ( ) { } elsif ( ) { } else { } + == != <=> eq ne cmp for Æ foreach Íu¢ÂÅàv¯¶ + & + | ^ ³K\»^¶ ³K\»Cüq + && ^ ¶ñæª /i 嬶³ + || $ ¶ñö(\nÌO) /m ^$x[XÌs + .. ... + 1Èã /s .É\nðÜÞ + ?: * 0Èã /x óð³ + = += -= *= etc. ? 0©1 /g O[o + , => {3,7} ÍÍÌJèÔµ + XgZq () ãûQÆ ³K\»¶NX + not (?:) ãûQƵȢ . == [^\n] + and [] ¶NX \s == [\x20\f\t\r\n] + or xor | Ü½Í \w == [A-Za-z0-9_] + \b Pê«E \d == [0-9] + \z ¶ñö \S, \W, \D Í»Ìt + µæ¤ + use strict; ·éÈ N + use warnings; "$foo" perl.com + my $var; $$variable_name perlmonks.org + open() or die $!; `$userinput` use.perl.org + use Modules; /$userinput/ perl.apache.org + parrotcode.org + ÖÌÔèl + stat localtime caller ÁêÏ + 0 dev 0 b 0 package $_ ftHgÏ + 1 ino 1 ª 1 filename $0 vO¼ + 2 mode 2 2 line $/ üÍZp[^ + 3 nlink 3 ú 3 subroutine $\ oÍZp[^ + 4 uid 4 -1 4 hasargs $| ©®flush + 5 gid 5 N-1900 5 wantarray $! sys/libcallG[ + 6 rdev 6 jú 6 evaltext $@ evalG[ + 7 size 7 NÌú 7 is_require $$ vZXID + 8 atime 8 ÄÔ© 8 hints $. sÔ + 9 mtime 9 bitmask @ARGV R}hCø + 10 ctime POSIX:: @INC CN[hpX + 11 blksz strftime 3..9ÍEXPR @_ Tu[`ø + 12 blcks ðg¨¤! ̾¯ %ENV Â«Ï + +=head1 ACKNOWLEDGEMENTS + +=begin original + +The first version of this document appeared on Perl Monks, where several +people had useful suggestions. Thank you, Perl Monks. + +=end original + +±Ì¶ÌÅÌo[WÍ Perl Monks É»êA½l©©çLpÈ +ñÄð¸«Üµ½BPerl MonksA èªÆ¤B + +=begin original + +A special thanks to Damian Conway, who didn't only suggest important changes, +but also took the time to count the number of listed features and make a +Perl 6 version to show that Perl will stay Perl. + +=end original + +dvÈÏXðñĵÄê½¾¯ÅÈA¢ÂÌ@\ªÚÁÄ¢é©ð +¦ÄêAPerl ª Perl ÌÜÜÅ é±Æ𦷽ßÉ Perl 6 Åð +ìÁÄê½ Damian Conway ÉÁɴӵܷB + +=head1 AUTHOR + +Juerd Waalboer <juerd****@cpan*****>, with the help of many Perl Monks. + +=head1 SEE ALSO + + http://perlmonks.org/?node_id=216602 the original PM post + http://perlmonks.org/?node_id=238031 Damian Conway's Perl 6 version + http://juerd.nl/site.plp/perlcheat home of the Perl Cheat Sheet