Re: How do you continue in a for loop?



On 2007-07-31, Thierry <lamthierry@xxxxxxxxx> wrote:
In other languages, the for loop has a continue statement feature to
skip an interation, how do you do it in perl?

"next". For example:

for (my $i = 0; $i < 10; ++$i)
{
if ($i == 7)
{
next;
}
else
{
print $i, "\n";
}
}
.