|
Perl 6
WITCH squiggle: Revision 5
^ Mnemonics
"string","stitch" ** Almost always has something to do with strings or matching ---- ^ Used alone ~ As a prefix operator, "coerces"<http://www.oreillynet.com/onlamp/blog/2007/09/yap6_operator_coercion_operato.html> to subtype Str (string) ~ As an infix operator: concatinate or "stitch"<http://www.oreillynet.com/onlamp/blog/2007/09/yap6_operator_stitching.html> characters together, instead of . in perl5. "Specification"<http://perlcabal.org/syn/S03.html#Concatenation> ^ Operators containing this character ~^ ~| ~& "bitwise logical operations"<http://perlcabal.org/syn/S03.html#Additive_precedence> on buffers or strings ~= String Append, the post-assignment "mutant"<http://www.oreillynet.com/onlamp/blog/2007/12/yap6_operator_mutating_operato_1.html> form of ~ ~~ and !~~ The "Smart Match"<http://perlcabal.org/syn/S03.html#Smart_matching> operator and its negated form. ^ When used inside regexes ~~ and !~~ inside a regular expression: cause a nested "submatch"<http://perlcabal.org/syn/S05.html#New_metacharacters> to be performed. ~ is a helper for matching "nested subrules"<http://perlcabal.org/syn/S05.html#New_metacharacters> with a specific terminator as the goal. <~~ inside a regular expression starts an "extensible metasyntax"<http://perlcabal.org/syn/S05.html#Extensible_metasyntax_(%3C...%3E)> for sub-pattern re-use (and must be closed with >) ^ Hyper operator and meta operator restrictions Most "hyper operators and meta operators"<http://perlcabal.org/syn/S03.html#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 +^. |