method redo
Documentation for method redo
assembled from the following types:
class Label
From Label
(Label) method redo
Defined as:
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 »