Приглашаем посетить
Философия (philosophy.niv.ru)

[Chapter 3] 3.2.120 redo

PreviousChapter 3
Functions
Next
 

3.2.120 redo

redo LABEL
redo

The redo command restarts a loop block without evaluating the conditional again. The continue block, if any, is not executed. If the LABEL is omitted, the command refers to the innermost enclosing loop. This command is normally used by programs that wish to deceive themselves about what was just input:

# A loop that joins lines continued with a backslash.
LINE: while (<STDIN>) {
    if (s/\\\n$// and $nextline = <STDIN>) {
        $_ .= $nextline;
        redo LINE;
    }
    print;  # or whatever...
}


PreviousHomeNext
3.2.119 recvBook Index3.2.121 ref