last keyword is used to loop control statement which immediately causes the current iteration of the loop to become the last. If a label given, then it comes of the loop by the label.
# Comes out of the current loop.
# Comes out of the loop specified by
Sum = 11 Exiting the loop Loop ended at Sum > 10
Sum is 22
- Perl | Basic Syntax of a Perl Program
- Perl vs C/C++
- Perl | lt operator
- Perl | uc() Function
- Perl | my keyword
- Perl | oct() Function
- Perl | int() function
- Perl | each() Function
- Perl | Arrays
- Use of print() and say() in Perl
- Perl | next operator
- Perl Hash
- Perl | Operators | Set - 1
- Perl | ord() Function
- Perl | q operator
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.