Home » Perl redo Statement

Perl redo Statement

by Online Tutorials Library

Perl redo Statement

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:


Perl redo statement Example

Output:

a = 5  a = 10  a = 20  a = 50  a = 100  

In the above program, loop restarts at redo condition that is when $a reaches 40.

Next TopicPerl for Loop

You may also like