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).