Perl loops-redo Statement - Perl Scripting

What is Perl redo statement?

The redo command is nothing but restarting the loop block without evaluating the conditional statement again. You can give a LABEL with redo statement where LABEL is the label for a loop. A redo statement can be used inside a nested loop where it will be applicable to the nearest loop if a LABEL is not specified.
If there is any continue block on the loop, then it will not be executed before evaluating the condition.


The syntax for a redo statement is as follows −

Flow Diagram



The following program shows the usage of redo statement −

All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd Protection Status

Perl Scripting Topics