Perl suite
Fermé
19901448
-
13 nov. 2001 à 17:21
Bobinours Messages postés 2898 Date d'inscription jeudi 26 avril 2001 Statut Membre Dernière intervention 21 mars 2013 - 14 nov. 2001 à 13:45
Bobinours Messages postés 2898 Date d'inscription jeudi 26 avril 2001 Statut Membre Dernière intervention 21 mars 2013 - 14 nov. 2001 à 13:45
A voir également:
- Perl suite
- Denon perl pro test - Guide
- Active perl - Télécharger - Édition & Programmation
- Can't open perl script "makefile.pl": no such file or directory - Forum Perl
- Perl ftp - Forum Perl
- Perl xampp ✓ - Forum Linux / Unix
2 réponses
jphilippe
Messages postés
78
Date d'inscription
dimanche 7 octobre 2001
Statut
Membre
Dernière intervention
31 janvier 2002
6
13 nov. 2001 à 21:46
13 nov. 2001 à 21:46
#!/usr/bin/perl (entête certainement faux, je suis sous win32)
$n=15 ;
for ($i=0; $i<20; $i++) { #debut de ma boucle
if ($i==$n) { # condition
print "ici <$i>\n"
}else {
print "la <$i>\n" ;
}
}
$n=15 ;
for ($i=0; $i<20; $i++) { #debut de ma boucle
if ($i==$n) { # condition
print "ici <$i>\n"
}else {
print "la <$i>\n" ;
}
}
Bobinours
Messages postés
2898
Date d'inscription
jeudi 26 avril 2001
Statut
Membre
Dernière intervention
21 mars 2013
504
14 nov. 2001 à 13:45
14 nov. 2001 à 13:45
PERL est un peu déroutant au début, mais une fois qu'on l'a découvert, on ne peu plus s'en passé.
J'ajouterai à l'exemple de jphilippe:
1) WHILE
while(condition d'arret)
{
...
}
2) FOREACH
foreach $element (@tableau)
{
...
}
-= Bobinours =-
J'ajouterai à l'exemple de jphilippe:
1) WHILE
while(condition d'arret)
{
...
}
2) FOREACH
foreach $element (@tableau)
{
...
}
-= Bobinours =-