- Almost always has something to do with strings or matching
~ As a prefix operator, coerces to subtype Str (string)
~ As an infix operator: concatinate or stitch characters together, instead of . in perl5. Specification
Operators containing this character
$~ not an operator, but a twigil for a slang
~^ ~| ~& bitwise logical operations on buffers or strings
~= String Append, the post-assignment mutant form of ~
~~ and !~~ The Smart Match operator and its negated form.
When used inside regexes
~~ and !~~ inside a regular expression: cause a nested submatch to be performed.
~ is a helper for matching nested subrules with a specific terminator as the goal.
<~~ inside a regular expression starts an extensible metasyntax for sub-pattern re-use (and must be closed with >)
Most hyper operators and meta operators have functional ~ forms.
Old, deprecated, or other language uses
=~ and !~ in Perl5 used to be for matching. Now it is ~~ (see above). =~ is always a syntax error in Perl6.
~ as a prefix operator in perl5 was a logical binary invert. Now that is ~^ or +^.