While en Lenguaje Perl šŸ„‡ Foro Lenguajes de Programación


#1:  While en Lenguaje Perl  Autor: Aforo Enlaces Publicado: Lun Mar 31, 2008 4:39 pm
    ----
En el siguiente ejemplo explicamos como hacer un bucle while en Perl.
La explicación estÔ en forma de comentarios embebida en el mismo texto.

Quote::
#!/usr/bin/perl

# Inicializo la variable Contador ($cnt)
$cnt = 0;

# Comienzo el bucle While
While ($cnt <= 7) {
# Imprimo la variable y nueva linea: \n
print "$cnt\n";
# Incremento el contador
$cnt ++;
}





Foros de Webnaranja Foro de Lenguajes de Programación

Todas las horas son GMT + 1 Hora

PƔgina 1 de 1 - Tema con 1 Mensajes y 13719 Lecturas

Diseño web, bases de datos, lenguajes de programación, comunidades... todo lo necesario para construir tu sitio web.
The logos and trademarks used on this site are the property of their respective owners. We are not responsible for comments posted by our users, as they are the property of the poster.
Aviso Legal - Privacidad Construyendo la web 2.0
The logos and trademarks used on this site are the property of their respective owners. We are not responsible for comments posted by our users, as they are the property of the poster.
Aviso Legal - Privacidad