Multiple choice technology programming languages

my $val = 'x'; print ref($val); What is the output?

  1. SCALAR

  2. empty value

  3. STRING

  4. not a reference

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

The ref() function returns the reference type of its argument. Since $val is a plain string (not a reference), ref() returns an empty string/false, not 'SCALAR' or any type name.