The Perl last statement is used to exit the loop statement block, thereby ending the loop. The statements after the last statement will no longer be executed, and the continue statement block will no longer be executed.
The syntax format is as follows:
last[LABEL];
Executing the above program, the output result is:
The value of a is: 10 The value of a is: 11 The value of a is: 12a The value of a is: 13a The value of a is: 14