Numeric operators
In the Perl language there are available the following numeric operators:

arithmetic operators

numeric relational operators

numeric logical operators

numeric bitwise operators

other numeric operators

numeric assignment operators
In the table below you see the Perl operators used in arithmetic operations.
Op 
Name 
Definition 
+ 
addition 
It's a binary operator that returns the sum of two operands. Example: 
 
subtraction 
It's a binary operator that returns the difference of two operands. Example: 
 
negation 
It's a unary operator that performs arithmetic negation. Example: 
* 
multiplication 
It's a binary operator that multiplies two operands. Example: 
/ 
division 
It's a binary operator that divides left value by right value. Example: 
** 
It's a binary operator that raises the left value to the power of the right value. Example: 

% 
modulus 
It's a binary operator that returns the remainder of dividing left value by right value. Example: 
++ 
If you place this unary operator before/after a variable, the variable will be incremented before/after returning the value. Example: 

 
If you place this unary operator before/after a variable, the variable will be decremented before/after returning the value. Example: 
The numeric relational Perl operators compare two numbers and determine the validity of a relationship.
Op 
Name 
Definition 
< 
less than 
The "less than" operator indicates if the value of the left operand is less than the value of the right one. Example: 
<= 
less than or equal to 
The "less than or equal to" operator indicates if the value of the left operand is less than or equal to the value of the right one. Example: 
> 
greater than 
The "greater than" operator indicates if the value of the left operand is greater than the value of the right one. Example: 
>= 
greater than or equal to 
The "greater than or equal to" operator indicates if the value of the left operand is greater than or equal to the value of the right one. Example: 
== 
equal 
The "equal" operator returns true if the left operand is equal to the right one. Example: 
!= 
not equal to 
The "not equal to" operator returns true if the left operand is not equal to the right one. Example: 
<=> 
numeric comparison 
This binary operator returns 1, 0, or 1 if the left operand is less than, equal to or greater than the right one. Example: 
The numeric logical Perl operators are generally derived from boolean algebra and they are mainly used to control program flow, finding them as part of an if, a while or some other control statement. See in the table below the logical numerical Perl operators.
Op 
Name 
Definition 
! 
negation 
This unary operator evaluates an operand and return true if the operand has the false value (0) and false otherwise. 
not 
not 
It has the same meaning as the "!" operator, described above.

and, && 
and 
The "and" operator returns the logical conjunction of two operands. Example: 
or,  
or 
The "or" operator returns the logical disjunction of two operands. Example: 
xor 
exclusive or 
The "exclusive or" operator returns the logical exclusiveor of two operands (the result is true if either but not both of the operands is true). Example: 
? 
conditional operator 
This ternary operator is like the symbolic if ... then ... else clause from the C language. It returns the second operand if the leftmost operand is true and the third operand otherwise. 
Numeric bitwise Perl operators are similar to the logical operators, but they work on the binary representation of data. They are used to change individual bits in an operand. Please note that both operands associated with bitwise operators are integers.
Op 
Name 
Definition 
<< 
shift left 
The "shift left" << operator is a binary operator that shifts the bits to the left. Its first operand specifies the integer value to be shifted meanwhile the second one specifies the number of position that the bits in the value will be shifted. The rightmost bits of the integer value will be assigned with 0 and the leftmost bits will be discarded. 
>> 
shift right 
The "shift right" >> operator is a binary operator that shifts the bits to the right. Its first operand specifies the integer value to be shifted meanwhile the second one specifies the number of position that the bits in the value will be shifted. The leftmost bits of the integer value will be assigned with 0 and the rightmost bits will be discarded. 
& 
and 
The "and" operator sets a bit to 1 if both of the corresponding bits in its operands are 1, and 0 otherwise. 
 
or 
The "or" operator sets a bit to 0 if both of the corresponding bits in its operands are 0, and 1 otherwise. 
^ 
exclusive or 
The "exclusive or" operator sets a bit to 1 if the corresponding bits in its operands are different, and 0 otherwise. 
~ 
not 
The unary "not" operator inverts each bit in the operand, changing all the ones to zeros and zeros to ones. 
See in the table below other numeric Perl operators:
Op 
Name 
Definition 
, 
comma 
In scalar context this binary operator evaluates its left argument, discards this value, then evaluates its right argument and returns that value. In a list context, it's just a separator and inserts both its arguments into the list. 
=> 
comma 
It has the same function like the comma operator described above.

.. 
Range operator 
In scalar context, this operator returns false as long as its left operand is false. When the left operand becomes true, the range operator returns true until the right operator remains true, after which it becomes false again. In a list context, this operator will return an array with contiguous sequences of items, beginning with the left operand value and ending with the right operand value (the items can be characters or numbers). 
Numeric assignment Perl operators perform some type of numeric operation and then assign the value to the existing variable.
Op 
Name 
Definition 
= 
assignment 
This is the ordinary assignment operator. In a scalar context, it assigns the right operand's value to the left operand. In a list context, it assigns multiple values to the left array operand if the right operand is a list. 
+= 
addition 
It adds the right operand's value to the left operand. 
= 
subtraction 
It subtracts the right operand from the left operand. 
*= 
multiplication 
It multiplies the left operand's value by the right operand's value. 
/= 
division 
It divides the left operand's value by the right operand's value. 
**= 
exponentiation 
It raises the left operand's value to the power of the right operand's value. 
%= 
modulus 
It divides the left operand value by the right operand value and assigns the remainder to the left operand. 
&&= 
logical and 
It's a combination between the logical "&&" and the assignment operators. 
= 
logical or 
It's a combination between the logical "" and the assignment operators. 
<<= 
bitwise shift left 
It's a bitwise left shift assign. 
>>= 
bitwise shift right 
It's a bitwise right shift assign. 
&= 
bitwise and 
It's a bitwise AND assign. 
= 
bitwise or 
It's a bitwise OR assign. 
^= 
bitwise exclusive or 
It's a bitwise XOR assign. 