Definition: Perl's scalar is a container that can hold a single value. The scalar is assigned a variable name, preceded by the $ character. The variable name may only contain letters, numbers, or the underscore character. Because perl is a loosely typed language, there is no need to declare the type of data that is stored in a scalar. Perl will determine the type based on context. The following are some examples of valid variable names:
$theTotal = 25;
$counter = 1;
$perl_scalar_1 = "My Data."
