- or download this
my $i;
for $i ( 0 .. 10 ) {
...
...
}
my $x = substr $somestring, 0, $i;
- or download this
my $i=0;
{
...
redo;
}
my $x = substr $somestring, 0, $i;
- or download this
$i=0;
do{
...
$i++
} until <somecondition>;
my $x = substr $somestring, 0, $i;
- or download this
my $i=42;
for my $i (1..10){
...
print $i;
## gives
1 2 3 4 5 6 7 8 9 10 42