My question is.. if I set $i to 0, will the next LABEL take the value of $i that i gave it, or will it go to the next $i in the loop.. so if $i equaled 9 when the loop begain, and it went through that statement, when the next LABEL; command came up, would $i equal 0 when it did the loop again, or would it equal 10?$j=23; LABEL: for ($i=$j; $i<=$#array; $i++) { if ($array[$i] eq "blah") { last LABEL; } elsif ($i == $#array) { $i = 0; next LABEL; } else { next LABEL; } }
In reply to Can I do this? by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |