use strict; use warnings; TOP: for (my $i = 1; $i < 10; $i++) { if (5 == $i) { next TOP; } print "Iteration $i\n"; }
It will, of course, print all the integers from 1 to 9 except for the number 5.
In reply to Re: go back to top of for loop
by liverpole
in thread go back to top of for loop
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |