Multiple choice technology programming languages

Which of the above is valid variable name?

  1. $_4x
  2. $10thLine
  3. $line.No
  4. count

  5. $lineNo!
Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

In Perl, variable names must start with \$ or @ (or % for hashes), then optionally more letters, digits, or underscores. \$10thLine is invalid because variable names cannot start with a digit. $_4x is valid (scalar with underscore). $line.No is valid (dot allowed). count without \$ is not a scalar variable. \$lineNo! is invalid (! not allowed).