Perl 程式設計/關鍵字/continue
外觀
continue是一個流程控制語句,如果後面跟著一個BLOCK。在BLOCK或BLOCK中,每次在條件要被評估之前,BLOCK的內容會被執行。因此,它可以用來在 next 語句(類似於 C 和其他語言的continue語句)之後遞增迴圈變數。
TheBLOCK可以包含 last,next,或 redo 命令,其中 last 和 redo 的行為與在主塊中呼叫它們的行為相同。
continue BLOCK
continue
while (EXPRESSION) {
### possible redo
do_something;
} continue {
### possible next
do_something_else;
# go back the top to re-check the EXPRESSION
}
### possible last call