Which of the following commands will turn a scalar ($str)into an array of characters?

  1. @a = split($str).

  2. @a = split(/\s/, $str).

  3. This task can be done in Perl but none of the above commands do it.

  4. @a = split(/./, $str).


Correct Option: C

Find more quizzes: