Tags
There are no tags for this page.
Attachments
Perl 6
WITCH plus
Mnemonics
"positive", "number", "add"
-- usage is very intuitive
-- does not have the "required" meaning one may be used to (instead that is ! bang)
Used alone
+ along with - coerces to type Num
+ As an infix operator: adds numbers
Operators containing this character
++ pre and post increment as in common parlance (which means use it like you would expect)
+^ +| +& bitwise logical operations on buffers or strings
+= the post-assignment mutant form of +
.++ post increment dotted form (used like a method)
.:<++> pre increment dotted form (used like a method)
[+] not special sugar but will be often seen: reduce operator that sums a list
When used inside regexes
+ ans +? still mean one or more
+: is the same but prevents panicked backtracking
+ at the opening of a character class is unecessary but can be used for clarity the same as -
+ between character classes combines them if the character class started with + or -
Other Uses
+ has wildcard uses in version literals
+ before a flag on the commandline results in special values in a MAIN subroutine
[+*] finds the next empty slot at the end of the array which is not special sugar but worth noting.
+ is a border intersection in POD
Obselete, deprecated or other language uses
+ was replaced as a twigil by * to indicate a contextually scoped variable
|