Multiple choice technology programming languages

Which operator can be used to create private variables within a subroutine?

  1. native

  2. limited

  3. my

  4. regional

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

The 'my' operator in Perl creates private (lexically scoped) variables within a subroutine or block. These variables are only accessible within their declared scope and are destroyed when the scope ends. Options A, B, and D are not valid Perl variable declaration keywords.