Scalar Data

Operators for numbers

Example:
$a = 3;
$b = 5;
$c = $a  * $b;       # $c gets 15
$d = $c  / 2;        # $d gets 7.5


You may use parentheses, as in normal math.

For example, to calculate an average:

$e = ($a + $b) / 2;  # $e gets 4

Table of Contents.
Previous | Next.