redo
ErrorsCollection

redo

Synthesised documentation from type/Label

From type/Label

See Original text in context

method redo(Label:)

Repeat the same iteration of the loop associated with the label.

my $has-repeated = False;
 
MY-LABEL:
for 1..10 {
    print "$_ ";
    if $_ == 5 {
        LEAVE $has-repeated = True;
        redo MY-LABEL unless $has-repeated;
    }
}
 
# OUTPUT: «1 2 3 4 5 5 6 7 8 9 10 »