Updated: 04/26/2017 by Computer Hope

A scalar may refer to any of the following:

1. Scalar is a single number or value.

2. In Perl 5 and above and most programming languages a scalar is a single value that is not an array. A scalar may be string, integer, or a floating-point. For example, "my $value="example";" is an example of a scalar in Perl, where $value is equal to the string 'example'.

Perl, Programming terms, Variable