The Perl redo statement restarts the current loop without evaluation of the control statement. Further statements in the block will not be executed.
The syntax of redo statement is given below:
redo;
$a = 5; while($a < 150){ if( $a == 40 ){ $a = $a + 10; redo; } print "a = $a\n"; }continue{ $a = $a * 2; }
In the above program, loop restarts at redo condition that is when $a reaches 40.