Perl Variables  «Prev  Next»

Perl Scalars in Context - Quiz

Each question is worth one point. Select the best answer for each question.
 
1. When is a scalar a number?
Please select the best answer.
  A. When it has no alphabetic characters
  B. When it's used in a numeric context
  C. When it's used in any context

2. Given the line of code below, what is the type of the scalar variable s?
$s = "78"
Please select the best answer.
  A. $s is a number
  B. $s is a string
  C. $s is a character

Your score is 0.0