Perl redo Statement
The Perl redo statement jumps directly to the first line of the loop body to repeat the current iteration; the statements after redo and the continue block are no longer executed.
The continue statement can be used in while and foreach loops.
Syntax
The syntax format is as follows:
redo [LABEL]
Here LABEL is optional.
A redo statement with the LABEL modifier transfers the loop control flow directly to the first line of the block associated with the LABEL modifier, without executing the statements after redo or the continue block;
A redo statement without the LABEL modifier transfers the loop control flow directly to the first line of the current block, without executing the statements after redo or the continue block;
If it is in a for loop or has a continue block, the increment list in the for loop and the continue block are no longer executed;
Flowchart

Example
#/usr/bin/perl
$a
=
0
;
while
(
$a
<
10
)
{
if
(
$a
==
5
)
{
$a
=
$a
1;
redo
;
}
"
a =
$a
\n
"
;
}
continue
{
$a
=
$a
1
;
}
Running the above program, the output is:
a = 0
a = 1
a = 2
a = 3
a = 4
a = 6
a = 7
a = 8
a = 9
Perl Loops