« Programmation Perl/Itérations » : différence entre les versions
Contenu supprimé Contenu ajouté
Ligne 84 :
==== exemples ====
<source lang="perl" line >
#!/usr/bin/perl -w
my $valeur_max = 10;▼
use strict;
my $indice = 0;
do
{
say "$indice "; # 0 1 2 3 4 5
} while ++$indice < $valeur_max ;
print "\n";
# $indice > 6
$indice = 9;
do
{
say "
} while ++$indice < $valeur_max ;
</source>
|