Multiple choice technology programming languages

Within a loop, which operator immediately ends execution of the loop?

  1. next

  2. last

  3. redo

  4. leave

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

In Perl, the last operator immediately exits the loop and ends its execution. This is different from next which skips to the next iteration, and redo which restarts the current iteration. leave is not a valid Perl operator.