Multiple choice technology programming languages

$input = “abdce”; $output = $input =~ tr/abc/123; print $input; print $output

  1. 12d3e 3

  2. 12d3e 5

  3. 12d3e 1

  4. Error

  5. 12d3e null string

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

The tr/abc/123 operator transliterates: a→1, b→2, c→3. Other characters pass through. 'abdce' becomes '12d3e'. The tr operator returns the number of transliterations made (3), which becomes $output's value. Print outputs both strings.