A scalar value may be:
nnn nn . nnnn . nnE nn |
Any integer or real decimal constant. | |
0x nn |
Hexadecimal constant. | |
0 nn |
Octal constant. | |
0b nn |
Binary constant. | |
' text' |
String literal: only \' and \\ escape sequences are expanded. |
|
" text" |
String literal: all \ x escape sequences and all $ variable values are expanded. |
A scalar variable is named $
identifier. It may contain:
number | A floating point number (note that Perl does not use integer values). See Operators. | |
or | ||
string | A text string, of arbitrary length. See Operators. | |
or | ||
undef |
The undefined value. Equivalent to zero when used in a numeric
expression, or an empty string when used in a string expression. Explicitly
check for undef using the defined( scalar expression) function. |