print "i = $i\n" while ($i++ < 10); $i = 0; print "i = $i\n" until ($i++ >= 10); print "$_\n" for (1..10); # note: for my $i ... doesn't work