The Perl next statement is used to stop executing the statements starting from the next statement of the next statement to the end identifier of the loop body, transfer to the execution of the continue statement block, and then return to the beginning of the loop body to start executing the next loop.
The syntax format is as follows:
next [LABEL];
LABEL is optional. If LABEL is not specified, the next statement will return to the beginning of the loop body and start executing the next loop.
Executing the above program, the output result is:
The value of a is: 10a The value is: 11a The value of 12a is: 13a The value is: 14a The value is: 16a The value of 17a is: 18a The value of a: 19