1.

Explain in simple words the use of a redo statement.

Answer»

The redo statement in Perl restarts the EXISTING loop without evaluating the control statement. Also, further statements within the BLOCK won't get executed. 

Program: 

$numb = 10;    while($numb < 150){       if( $numb == 50 ){         $numb = $a + 10;          redo;       }       print "Number = $numb \N";    } CONTINUE {       $numb = $numb * 2;    } 



Discussion

No Comment Found