$bu[0] = 0; for my $i (1 .. 2*$nb) { # Easier to read. Just as efficient. $bu[$i] = $i * $beu; # Fix. print "$i\t$bu[$i]\n"; }