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 current loop, similar to 'break' in other languages. The 'next' operator skips to the next iteration, 'redo' restarts the current iteration without re-evaluating the condition, and 'leave' is not a valid Perl loop control operator.