Multiple choice technology programming languages

Which operator can be used to access the first item in an array?

  1. shift

  2. start

  3. right$
  4. left$
Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

The shift operator in Perl removes and returns the first element of an array, reducing the array size by one. This is distinct from other array access methods like pop() for the last element. Options B, C, and D are not standard Perl operators for array manipulation.