Perl Scalar Type Variable - Quiz Explanation

The correct answers are indicated below, along with the text that explains the correct answers.
 
1. Which of the following is a correct scalar variable name?
Please select the best answer.
  A. firstName
  B. $1firstName
  C. $firstName
  The correct answer is C.
All scalar variables are introduced by the $ symbol.
The actual name of the variable may include any of the characters in the ASCII set, alpha (a-z, A-Z), numeric (0-9), and the underscore ( _ ) with the exception that the first character may not be numeric.


2. What is the difference between a scalar value and a scalar variable?
Please select the best answer.
  A. A scalar value has a name associated with it
  B. A scalar variable has a name associated with it
  C. A scalar variable can refer to two-dimensional data
  The correct answer is B.
A scalar variable is simply a scalar value that has a name associated with it. Scalar values and scalar variables are always one-dimensional.