Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
223 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,121 @@ | ||
=encoding utf8 | ||
|
||
=head1 NOMBRE | ||
|
||
perlcheat - Hoja resumen de Perl 5 | ||
|
||
=head1 DESCRIPCIÓN | ||
|
||
Esta 'hoja resumen' es una referencia útil para programadores principiantes. | ||
No abarca todo, pero incluye 195 características del lenguaje; no es mal | ||
comienzo. | ||
|
||
=head2 La hoja | ||
|
||
CONTEXTOS SIGILOS ref ARRAYS HASHES | ||
void $escalar ESCALAR @array %hash | ||
escalar @array ARRAY @array[0, 2] @hash{'a', 'b'} | ||
lista %hash HASH $array[0] $hash{'a'} | ||
&sub CÓDIGO | ||
*glob GLOB VALORES ESCALARES | ||
FORMATO número, cadena, ref, glob, undef | ||
REFERENCIAS | ||
\ referencia $$foo[1] equivale a $foo->[1] | ||
$@%&* desreferenciar $$foo{bar} equivale a $foo->{bar} | ||
[] ref. array anón. ${$$foo[1]}[2] equivale a $foo->[1]->[2] | ||
{} ref. hash anón. ${$$foo[1]}[2] equivale a $foo->[1][2] | ||
\() lista de refs | ||
NÚMEROS CADENAS VÍNCULOS | ||
PRECEDENCIA OP. = = perldoc.perl.org | ||
-> + . search.cpan.org | ||
++ -- == != eq ne cpan.org | ||
** < > <= >= lt gt le ge pm.org | ||
! ~ \ u+ u- <=> cmp p3rl.org | ||
=~ !~ perlmonks.org | ||
* / % x SINTAXIS | ||
+ - . foreach (LISTA) { } for (a;b;c) { } | ||
<< >> while (e) { } until (e) { } | ||
ops unarios con nombre if (e) { } elsif (e) { } else { } | ||
< > <= >= lt gt le ge unless (e) { } elsif (e) { } else { } | ||
== != <=> eq ne cmp ~~ given (e) { when (e) {} default {} } | ||
& | ||
| ^ METACARACTERES EXP. REG. MODIFICADORES EXP. REG. | ||
&& ^ principio cadena /i no distinguir may./min. | ||
|| // $ fin cadena (antes \n) /m basado en líneas ^$ | ||
.. ... + una o más /s . incluir \n | ||
?: * cero o más /x ignorar espacios | ||
= += -= *= etc ? cero o una /p preservar | ||
, => {3,7} repeticiones en rango /a ASCII /aa seguro | ||
ops lista | alternancia /l config. reg. /d dual | ||
not [] clase caracteres /u Unicode | ||
and \b límite de palabra /e evaluar /ee reevaluar | ||
or xor \z fin cadena /g global | ||
() capturar /o compilar patrón una vez | ||
DEPURACIÓN (?:p) sin captura | ||
-MO=Deparse (?#t) comentario CLASES CARACTERES EXP. REG. | ||
-MO=Terse (?=p) inspec. pos. delante . [^\n] | ||
-D## (?!p) inspec. neg delante \s espacio en blanco | ||
-d:Trace (?<=p) inspec. pos. atrás \K \w caracteres palabra | ||
(?<!p) inspec. neg. atrás \d dígitos | ||
CONFIGURACIÓN (?>p) sin vuelta atrás \pP propiedad con nombre | ||
perl -V:ivsize (?|p|p) reinicio bifurcación \h espacio en blanco horiz. | ||
(?<NM>) capturar en nombre \R salto de línea | ||
\S \W \D \H negar | ||
LISTAS RETORNO FUNCIONES | ||
stat localtime caller VARIABLES ESPECIALES | ||
0 dev 0 segundo 0 paquete $_ variable predeterminada | ||
1 ino 1 minuto 1 nombre archivo $0 nombre programa | ||
2 mode 2 hora 2 línea $/ separador entrada | ||
3 nlink 3 día 3 subrutina $\ separador entrada | ||
4 uid 4 mes-1 4 hasargs $| volcado automático | ||
5 gid 5 año-1900 5 wantarray $! error de sys/libcall | ||
6 rdev 6 día semana 6 evaltext $@ error eval | ||
7 size 7 día año 7 is_require $$ Id. proceso | ||
8 atime 8 is_dst 8 hints $. número de línea | ||
9 mtime 9 máscara bits @ARGV args línea comandos | ||
10 ctime 10 hash de pistas @INC rutas de inclusión | ||
11 blksz 3..10 solo @_ args subroutina | ||
12 blcks con EXPR %ENV entorno | ||
|
||
=head1 AGRADECIMIENTOS | ||
|
||
La primera versión de este documento se publicó en Perl Monks, donde muchas | ||
personas realizaron útiles sugerencias. Gracias, Perl Monks. | ||
|
||
Debemos un agradecimiento especial a Damian Conway, quien no sólo sugirió | ||
importantes cambios, sino que también se entretuvo en contar el número de | ||
características incluidas y creó una versión para Perl 6 con el fin de | ||
demostrar que Perl seguirá siendo Perl. | ||
|
||
=head1 AUTOR | ||
|
||
Juerd Waalboer <#####@juerd.nl>, con la ayuda de muchos Perl Monks. | ||
|
||
=head1 VEA TAMBIÉN | ||
|
||
=over 4 | ||
|
||
=item * | ||
|
||
L<http://perlmonks.org/?node_id=216602> - Artículo original de PM | ||
|
||
=item * | ||
|
||
L<http://perlmonks.org/?node_id=238031> - Versión para Perl 6 de Damian Conway | ||
|
||
=item * | ||
|
||
L<http://juerd.nl/site.plp/perlcheat> - Página de la hoja resumen de Perl | ||
|
||
=back | ||
|
||
=head1 TRADUCTORES | ||
|
||
=over | ||
|
||
=item * Joaquín Ferrero (Tech Lead) | ||
|
||
=item * Enrique Nell (Language Lead) | ||
|
||
=back | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,102 @@ | ||
=head1 NOMBRE | ||
|
||
perlcheat - Hoja resumen de Perl 5 | ||
|
||
=head1 DESCRIPCIÓN | ||
|
||
Esta 'hoja resumen' es una referencia útil para programadores principiantes. No abarca todo, pero incluye 195 características del lenguaje; no es mal comienzo. | ||
|
||
=head2 La hoja | ||
|
||
CONTEXTOS SIGILOS ref ARRAYS HASHES | ||
void $escalar ESCALAR @array %hash | ||
escalar @array ARRAY @array[0, 2] @hash{'a', 'b'} | ||
lista %hash HASH $array[0] $hash{'a'} | ||
&sub CÓDIGO | ||
*glob GLOB VALORES ESCALARES | ||
FORMATO número, cadena, ref, glob, undef | ||
REFERENCIAS | ||
\ referencia $$foo[1] equivale a $foo->[1] | ||
$@%&* desreferenciar $$foo{bar} equivale a $foo->{bar} | ||
[] ref. array anón. ${$$foo[1]}[2] equivale a $foo->[1]->[2] | ||
{} ref. hash anón. ${$$foo[1]}[2] equivale a $foo->[1][2] | ||
\() lista de refs | ||
NÚMEROS CADENAS VÍNCULOS | ||
PRECEDENCIA OP. = = perldoc.perl.org | ||
-> + . search.cpan.org | ||
++ -- == != eq ne cpan.org | ||
** < > <= >= lt gt le ge pm.org | ||
! ~ \ u+ u- <=> cmp p3rl.org | ||
=~ !~ perlmonks.org | ||
* / % x SINTAXIS | ||
+ - . foreach (LISTA) { } for (a;b;c) { } | ||
<< >> while (e) { } until (e) { } | ||
ops unarios con nombre if (e) { } elsif (e) { } else { } | ||
< > <= >= lt gt le ge unless (e) { } elsif (e) { } else { } | ||
== != <=> eq ne cmp ~~ given (e) { when (e) {} default {} } | ||
& | ||
| ^ METACARACTERES EXP. REG. MODIFICADORES EXP. REG. | ||
&& ^ principio cadena /i no distinguir may./min. | ||
|| // $ fin cadena (antes \n) /m basado en líneas ^$ | ||
.. ... + una o más /s . incluir \n | ||
?: * cero o más /x ignorar espacios | ||
= += -= *= etc ? cero o una /p preservar | ||
, => {3,7} repeticiones en rango /a ASCII /aa seguro | ||
ops lista | alternancia /l config. reg. /d dual | ||
not [] clase caracteres /u Unicode | ||
and \b límite de palabra /e evaluar /ee reevaluar | ||
or xor \z fin cadena /g global | ||
() capturar /o compilar patrón una vez | ||
DEPURACIÓN (?:p) sin captura | ||
-MO=Deparse (?#t) comentario CLASES CARACTERES EXP. REG. | ||
-MO=Terse (?=p) inspec. pos. delante . [^\n] | ||
-D## (?!p) inspec. neg delante \s espacio en blanco | ||
-d:Trace (?<=p) inspec. pos. atrás \K \w caracteres palabra | ||
(?<!p) inspec. neg. atrás \d dígitos | ||
CONFIGURACIÓN (?>p) sin vuelta atrás \pP propiedad con nombre | ||
perl -V:ivsize (?|p|p) reinicio bifurcación \h espacio en blanco horiz. | ||
(?<NM>) capturar en nombre \R salto de línea | ||
\S \W \D \H negar | ||
LISTAS RETORNO FUNCIONES | ||
stat localtime caller VARIABLES ESPECIALES | ||
0 dev 0 segundo 0 paquete $_ variable predeterminada | ||
1 ino 1 minuto 1 nombre archivo $0 nombre programa | ||
2 mode 2 hora 2 línea $/ separador entrada | ||
3 nlink 3 día 3 subrutina $\ separador entrada | ||
4 uid 4 mes-1 4 hasargs $| volcado automático | ||
5 gid 5 año-1900 5 wantarray $! error de sys/libcall | ||
6 rdev 6 día semana 6 evaltext $@ error eval | ||
7 size 7 día año 7 is_require $$ Id. proceso | ||
8 atime 8 is_dst 8 hints $. número de línea | ||
9 mtime 9 máscara bits @ARGV args línea comandos | ||
10 ctime 10 hash de pistas @INC rutas de inclusión | ||
11 blksz 3..10 solo @_ args subroutina | ||
12 blcks con EXPR %ENV entorno | ||
|
||
=head1 AGRADECIMIENTOS | ||
|
||
La primera versión de este documento se publicó en Perl Monks, donde muchas personas realizaron útiles sugerencias. Gracias, Perl Monks. | ||
|
||
Debemos un agradecimiento especial a Damian Conway, quien no sólo sugirió importantes cambios, sino que también se entretuvo en contar el número de características incluidas y creó una versión para Perl 6 con el fin de demostrar que Perl seguirá siendo Perl. | ||
|
||
=head1 AUTOR | ||
|
||
Juerd Waalboer <#####@juerd.nl>, con la ayuda de muchos Perl Monks. | ||
|
||
=head1 VEA TAMBIÉN | ||
|
||
=over 4 | ||
|
||
=item * | ||
|
||
L<http://perlmonks.org/?node_id=216602> - Artículo original de PM | ||
|
||
=item * | ||
|
||
L<http://perlmonks.org/?node_id=238031> - Versión para Perl 6 de Damian Conway | ||
|
||
=item * | ||
|
||
L<http://juerd.nl/site.plp/perlcheat> - Página de la hoja resumen de Perl | ||
|
||
=back |