Multiple choice technology programming languages

Assume that $var has the value hello . What is the value of the following sting? q (It’s time to say $var);

  1. It’s time to say $var

  2. It’s time to say hello

  3. Both

  4. None

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

In Perl, q() is a single-quoted string constructor that doesn't interpolate variables. The string q(It's time to say $var) treats $var literally, not as a variable. So the output is the literal text with $var unchanged, making option A correct. Double quotes would interpolate to 'hello'.