<?xml version="1.0" encoding="UTF-8"?>

<rss version="2.0" xmlns:blogChannel="http://backend.userland.com/blogChannelModule">

<channel>
<title><![CDATA[Perl 6: WITCH squiggle]]></title>
<link>http://www.perlfoundation.org/perl6/index.cgi?witch_squiggle</link>
<description></description>
<pubDate>Thu, 28 May 2009 20:07:28 -0000</pubDate>
<webMaster>synedra@gmail.com</webMaster>
<generator>Socialtext Workspace v2.14.7.2</generator>

<item>
<title><![CDATA[WITCH squiggle]]></title>
<link>http://www.perlfoundation.org/perl6/index.cgi?witch_squiggle</link>
<description><![CDATA[<div class="wiki">
<h1 id="mnemonics">Mnemonics</h1>
<p>
&quot;string&quot;,&quot;stitch&quot;</p>
<ul><ul>
<li>Almost always has something to do with strings or matching</li>
</ul></ul>
<hr />
<h1 id="used_alone">Used alone</h1>
<p>
~ As a prefix operator, <a target="_blank" title="(external link)" href="http://www.oreillynet.com/onlamp/blog/2007/09/yap6_operator_coercion_operato.html">coerces<!-- wiki-renamed-hyperlink "coerces"<http://www.oreillynet.com/onlamp/blog/2007/09/yap6_operator_coercion_operato.html> --></a> to subtype Str (string)<br />
~ As an infix operator: concatinate or <a target="_blank" title="(external link)" href="http://www.oreillynet.com/onlamp/blog/2007/09/yap6_operator_stitching.html">stitch<!-- wiki-renamed-hyperlink "stitch"<http://www.oreillynet.com/onlamp/blog/2007/09/yap6_operator_stitching.html> --></a> characters together, instead of . in perl5. <a target="_blank" title="(external link)" href="http://perlcabal.org/syn/S03.html#Concatenation">Specification<!-- wiki-renamed-hyperlink "Specification"<http://perlcabal.org/syn/S03.html#Concatenation> --></a></p>
<h1 id="operators_containing_this_character">Operators containing this character</h1>
<p>
$~ not an operator, but a twigil for a <a target="_blank" title="(external link)" href="http://perlcabal.org/syn/S02.html#Names">slang<!-- wiki-renamed-hyperlink "slang"<http://perlcabal.org/syn/S02.html#Names> --></a><br />
~^ ~| ~&amp; <a target="_blank" title="(external link)" href="http://perlcabal.org/syn/S03.html#Additive_precedence">bitwise logical operations<!-- wiki-renamed-hyperlink "bitwise logical operations"<http://perlcabal.org/syn/S03.html#Additive_precedence> --></a> on buffers or strings<br />
~= String Append, the post-assignment <a target="_blank" title="(external link)" href="http://www.oreillynet.com/onlamp/blog/2007/12/yap6_operator_mutating_operato_1.html">mutant<!-- wiki-renamed-hyperlink "mutant"<http://www.oreillynet.com/onlamp/blog/2007/12/yap6_operator_mutating_operato_1.html> --></a> form of ~<br />
~~ and !~~ The <a target="_blank" title="(external link)" href="http://perlcabal.org/syn/S03.html#Smart_matching">Smart Match<!-- wiki-renamed-hyperlink "Smart Match"<http://perlcabal.org/syn/S03.html#Smart_matching> --></a> operator and its negated form.</p>
<h1 id="when_used_inside_regexes">When used inside regexes</h1>
<p>
~~ and !~~ inside a regular expression: cause a nested <a target="_blank" title="(external link)" href="http://perlcabal.org/syn/S05.html#New_metacharacters">submatch<!-- wiki-renamed-hyperlink "submatch"<http://perlcabal.org/syn/S05.html#New_metacharacters> --></a> to be performed.<br />
~ is a helper for matching <a target="_blank" title="(external link)" href="http://perlcabal.org/syn/S05.html#New_metacharacters">nested subrules<!-- wiki-renamed-hyperlink "nested subrules"<http://perlcabal.org/syn/S05.html#New_metacharacters> --></a> with a specific terminator as the goal.<br />
&lt;~~ inside a regular expression starts an <a target="_blank" title="(external link)" href="http://perlcabal.org/syn/S05.html#Extensible_metasyntax_(%3C...%3E)">extensible metasyntax<!-- wiki-renamed-hyperlink "extensible metasyntax"<http://perlcabal.org/syn/S05.html#Extensible_metasyntax_(%3C...%3E)> --></a> for sub-pattern re-use (and must be closed with &gt;)</p>
<h1 id="hyper_operator_and_meta_operator_restrictions">Hyper operator and meta operator restrictions</h1>
<p>
Most <a target="_blank" title="(external link)" href="http://perlcabal.org/syn/S03.html#Meta_operators">hyper operators and meta operators<!-- wiki-renamed-hyperlink "hyper operators and meta operators"<http://perlcabal.org/syn/S03.html#Meta_operators> --></a> have functional ~ forms.</p>
<h1 id="old_deprecated_or_other_language_uses">Old, deprecated, or other language uses</h1>
<p>
=~ and !~ in Perl5 used to be for matching. Now it is ~~ (see above). =~ is always a syntax error in Perl6.<br />
~ as a prefix operator in perl5 was a logical binary invert. Now that is ~^ or +^.</p>
</div>
]]></description>
<author>Brian Julin</author>
<guid isPermaLink="true">http://www.perlfoundation.org/perl6/index.cgi?witch_squiggle</guid>
<pubDate>Thu, 28 May 2009 20:07:28 -0000</pubDate>
</item>

</channel>
</rss>