Operators

A

Addition (+)

Add two numbers, concatenate two strings, or add a number of days to a date.

Addition assignment (+=)

Apply addition to the current value of the target and the right operand.

Assignment (:=)

Store the value in a writable target.

D

Decrement (--)

Subtract one from the target.

Division (/)

Divide the left operand by the right operand.

Division assignment (/=)

Apply division to the current value of the target and the right operand.

E

Equality (=)

Compare two values for equality.

Exact equality (==)

Compare for exact equality.

Exponentiation (^ or **)

Raise the base to the exponent.

Exponentiation assignment (^=)

Apply exponentiation to the current value of the target and the right operand.

G

Greater than (>)

Return true when the left operand sorts after the right operand.

Greater than or equal (>=)

Return true when the left operand sorts after or compares equal to the right operand.

H

Hash pair (=>)

Associate a key with its value in a hash literal.

I

Increment (++)

Add one to the target.

Inequality (!= <>)

Return the logical inverse of ordinary equality.

L

Less than (<)

Return true when the left operand sorts before the right operand.

Less than or equal (<=)

Return true when the left operand sorts before or compares equal to the right operand.

Logical and (.AND.)

Return true when both logical operands are true.

Logical not (.NOT. or !)

Reverse the value of a logical expression.

Logical or (.OR.)

Return true when either logical operand is true.

M

Member access (: and ::)

Send a message to an object or access a data member.

Multiplication (*)

Multiply two numeric operands.

Multiplication assignment (*=)

Apply multiplication to the current value of the target and the right operand.

R

Reference (@)

Pass a variable by reference so the callee can change its value.

Remainder (%)

Return the remainder after division.

Remainder assignment (%=)

Apply remainder to the current value of the target and the right operand.

S

Structure field (.)

Access a field of a declared structure by name.

Subscript ([])

Select an array element by its one-based index or a hash entry by its key.

Substring ($)

Search for the left string within the right string.

Subtraction (-)

Subtract numbers, subtract days from a date, or subtract two dates to obtain a day count.

Subtraction assignment (-=)

Apply subtraction to the current value of the target and the right operand.

U

Unary sign (+ or -)

Unary plus preserves the numeric value.

W

Work area alias (->)

Read or write a field in the named work area.