Multiple choice technology programming languages

Which function can be used to break up a string into more than one part based upon a separator?

  1. chop

  2. split

  3. divide

  4. parse

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

The split() function in Perl breaks a string into multiple parts based on a separator pattern and returns a list. For example, split /,/, "a,b,c" returns ("a", "b", "c"). chop removes the last character, while divide and parse are not built-in Perl functions.