An operation with only one operand (a single input). Common unary operators include + plus, - minus, and bitwise not. Some operators can function as both unary and binary operators. For example, + and - operators can serve as either.
Languages Focus: Unary Operators
What unary operators are supported in additoin to the standard plus, minus, and bitwise not.
Perl Unary Operators
An operation with only one operand (a single input). The following are the Perl unary operators: !, -, ~, +, \, &, and *.
! performs logical negation which is "not"
- performs arithmetic negation if the operand is numeric.
~ performs bitwise negation, that is 1's complement.
+ has no semantic effect whatsoever, even on strings.