These exercise the C calls of the same names. Everything after the flags arg is passed as the the args to the called function. They return whatever the C function itself pushed onto the stack, plus the return value from the function; for example

This construct is a Perl expression. EXPRESSION must be an RPN arithmetic expression, as described below. The RPN expression is evaluated, and its value is returned as the value of the Perl expression.

This construct is a complete Perl statement. (No semicolon should follow the closing brace.) VARIABLE must be a Perl scalar my variable, and EXPRESSION must be an RPN arithmetic expression as described below. The RPN expression is evaluated, and its value is assigned to the variable.

Tokens of an RPN expression may be separated by whitespace, but such separation is usually not required. It is required only where unseparated tokens would look like a longer token. For example, 12 34 + can be written as 12 34+, but not as 1234 +.

An alphanumeric name preceded by dollar sign refers to a Perl scalar variable. Only variables declared with my or state are supported. If the variable's value is not a native integer, it will be converted to an integer, by Perl's usual mechanisms, at the time it is evaluated.

Remainder when A is divided by B with the quotient rounded towards zero. Division by zero generates an exception.

Because the arithmetic operators all have fixed arity and are postfixed, there is no need for operator precedence, nor for a grouping operator to override precedence. This is half of the point of RPN.

An RPN expression can also be interpreted in another way, as a sequence of operations on a stack, one operation per token. A literal or variable token pushes a value onto the stack. A binary operator pulls two items off the stack, performs a calculation with them, and pushes the result back onto the stack. The stack starts out empty, and at the end of the expression there must be exactly one value left on the stack.