Tutorials Point


  Perl Home

  PERL Functions

© 2011 TutorialsPoint.COM


  Home     References     About TP     Advertising  

PERL continue Function



Syntax

continue BLOCK


Definition and Usage

continue is actually a flow control statement rather than a function. If there is a continue BLOCK attached to a BLOCK (typically in a while or foreach ), it is always executed just before the conditional is about to be evaluated again, just like the third part of a for loop in C. Thus it can be used to increment a loop variable, even when the loop has been continued via the next statement.

last, next, or redo may appear within a continue block.

Return Value

  • Nothing

Example

   while (EXPR) {
	### redo always comes here
	do_something;
    } continue {
	### next always comes here
	do_something_else;
	# then back the top to re-check EXPR
    }
    ### last always comes here


Printer Friendly



  

Advertisement

Online Image Processing

Indian Baby Names