summaryrefslogtreecommitdiffhomepage
path: root/es-es
diff options
context:
space:
mode:
authorJoaquín Ferrero <explorer@joaquinferrero.com>2014-08-24 22:56:09 +0200
committerJoaquín Ferrero <explorer@joaquinferrero.com>2014-08-24 22:56:09 +0200
commit5f15d684efd831a6b048f2d42ea66f2494728d7f (patch)
tree3b4e14c52941520de18504a8a18878f1f341a4fb /es-es
parent53696bd547736eafd3233e9626838610b696a1d3 (diff)
Update perl-es.html.markdown
Perl syntax errors.
Diffstat (limited to 'es-es')
-rw-r--r--es-es/perl-es.html.markdown14
1 files changed, 9 insertions, 5 deletions
diff --git a/es-es/perl-es.html.markdown b/es-es/perl-es.html.markdown
index fecaf5c4..644182ff 100644
--- a/es-es/perl-es.html.markdown
+++ b/es-es/perl-es.html.markdown
@@ -36,19 +36,19 @@ my $respuesta = 42;
## Arreglos
# Un arreglo representa una lista de valores:
-my @animales = {"camello","llama","buho"};
-my @numeros = {23,42,69};
-my @mixto = {"camello",42,1.23};
+my @animales = ("camello","llama","buho"};
+my @numeros = (23, 42, 69);
+my @mixto = ("camello", 42, 1.23);
## Hashes
# Un hash representa un conjunto de pares llave/valor:
-my %color_fruta = {"manzana","rojo","banana","amarillo"};
+my %color_fruta = ("manzana","rojo","banana","amarillo");
# Puede usar un espacio en blanco y el operador "=>" para asignarlos más fácilmente
my %color_fruta = (
manzana => "rojo",
banana => "amarillo",
- );
+);
# Los escalares, arreglos y hashes están más documentados en perldata (perldoc perldata)
@@ -87,6 +87,10 @@ for ($i = 0; $i <= $max; $i++) {
...;
}
+for $i (0 .. $max) {
+ ...;
+}
+
foreach (@array) {
print "Este elemento es $_\n";
}