control flow redo

Documentation for control flow redo assembled from the following types:

language documentation Control Flow

From Control Flow

(Control Flow) control flow redo

The redo command restarts the loop block without evaluating the conditional again.

loop {
    my $x = prompt("Enter a number");
    redo unless $x ~~ /\d+/;
    last;
}