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

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

<channel>
<title><![CDATA[Perl 6: WITCH dash]]></title>
<link>http://www.perlfoundation.org/perl6/index.cgi?witch_dash</link>
<description></description>
<pubDate>Tue, 23 Feb 2010 07:39:57 -0000</pubDate>
<webMaster>synedra@gmail.com</webMaster>
<generator>Socialtext Workspace v2.14.7.2</generator>

<item>
<title><![CDATA[WITCH dash]]></title>
<link>http://www.perlfoundation.org/perl6/index.cgi?witch_dash</link>
<description><![CDATA[<div class="wiki">
<h1 id="mnemonics">Mnemonics</h1>
<p>
 &quot;negative&quot;, &quot;number&quot;, &quot;subtract&quot;</p>
<p>
 -- usage is very intuitive</p>
<hr />
<h1 id="used_alone">Used alone</h1>
<p>
<span class="nlw_phrase">-<!-- wiki: {{-}} --></span> along with + <a target="_blank" title="(external link)" href="http://www.oreillynet.com/onlamp/blog/2007/09/yap6_operator_coercion_operato.html">coerces to type Num<!-- wiki-renamed-hyperlink "coerces to type Num"<http://www.oreillynet.com/onlamp/blog/2007/09/yap6_operator_coercion_operato.html> --></a><br />
<span class="nlw_phrase">-<!-- wiki: {{-}} --></span> As an infix operator: subtracts numbers</p>
<h1 id="operators_containing_this_character">Operators containing this character</h1>
<p>
<span class="nlw_phrase">-<!-- wiki: {{-}} --></span> <span class="nlw_phrase">-<!-- wiki: {{-}} --></span> <a target="_blank" title="(external link)" href="http://perlcabal.org/syn/S03.html#Autoincrement_precedence">pre and post decrement<!-- wiki-renamed-hyperlink "pre and post decrement"<http://perlcabal.org/syn/S03.html#Autoincrement_precedence> --></a> as in common parlance (which means use it like you would expect)</p>
<h1 id="when_used_inside_regexes">When used inside regexes</h1>
<p>
<span class="nlw_phrase">-<!-- wiki: {{-}} --></span> at start of a character class <a target="_blank" title="(external link)" href="http://perlcabal.org/syn/S05.html#Extensible_metasyntax_(%3C...%3E)">changes the sense<!-- wiki-renamed-hyperlink "changes the sense"<http://perlcabal.org/syn/S05.html#Extensible_metasyntax_(%3C...%3E)> --></a><br />
<span class="nlw_phrase">-<!-- wiki: {{-}} --></span> <span class="nlw_phrase">=<!-- wiki: {{=}} --></span> 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 <span class="nlw_phrase">-<!-- wiki: {{-}} --></span></p>
<h1 id="other_uses">Other Uses</h1>
<p>
<span class="nlw_phrase">-<!-- wiki: {{-}} --></span> before a flag on the commandline results in normal values in a <a target="_blank" title="(external link)" href="http://perlcabal.org/syn/S06.html#Declaring_a_MAIN_subroutine">MAIN subroutine<!-- wiki-renamed-hyperlink "MAIN subroutine"<http://perlcabal.org/syn/S06.html#Declaring_a_MAIN_subroutine> --></a><br />
<span class="nlw_phrase">-<!-- wiki: {{-}} --></span> <span class="nlw_phrase">-<!-- wiki: {{-}} --></span> <span class="nlw_phrase">&gt;<!-- wiki: {{&gt;}} --></span> used to specify return type in a <a target="_blank" title="(external link)" href="http://perlcabal.org/syn/S02.html#Value_types">Signature<!-- wiki-renamed-hyperlink "Signature"<http://perlcabal.org/syn/S02.html#Value_types> --></a><br />
<span class="nlw_phrase">-<!-- wiki: {{-}} --></span> <span class="nlw_phrase">&gt;<!-- wiki: {{&gt;}} --></span> and <span class="nlw_phrase">&lt;<!-- wiki: {{&lt;}} --></span> <span class="nlw_phrase">-<!-- wiki: {{-}} --></span> <span class="nlw_phrase">&gt;<!-- wiki: {{&gt;}} --></span> introduces a <a target="_blank" title="(external link)" href="http://perlcabal.org/syn/S06.html#%22Pointy_blocks%22">pointy block<!-- wiki-renamed-hyperlink "pointy block"<http://perlcabal.org/syn/S06.html#%22Pointy_blocks%22> --></a><br />
<span class="nlw_phrase">[*-1]<!-- wiki: {{[*-1]}} --></span> finds the <a target="_blank" title="(external link)" href="http://perlcabal.org/syn/S09.html#Negative_and_differential_subscripts">last entry<!-- wiki-renamed-hyperlink "last entry"<http://perlcabal.org/syn/S09.html#Negative_and_differential_subscripts> --></a> of an array which is not special sugar but worth noting.<br />
<span class="nlw_phrase">+<!-- wiki: {{+}} --></span> is a <a target="_blank" title="(external link)" href="http://perlcabal.org/syn/S26.html">border intersection<!-- wiki-renamed-hyperlink "border intersection"<http://perlcabal.org/syn/S26.html> --></a> in POD<br />
<span class="nlw_phrase">-<!-- wiki: {{-}} --></span> can be used in identifiers, along with _ and '</p>
<h1 id="old_deprecated_or_other_language_uses">Old, deprecated, or other language uses</h1>
<p>
<span class="nlw_phrase">-<!-- wiki: {{-}} --></span> <span class="nlw_phrase">&gt;<!-- wiki: {{&gt;}} --></span> is no longer the method operator as in perl5. That is now . like most other languages.<br />
<span class="nlw_phrase">-<!-- wiki: {{-}} --></span> delimits character class ranges like in most regular expression implementations. Perl6 uses the .. Range operator for that instead.</p>
</div>
]]></description>
<author>Samuel Harrington</author>
<guid isPermaLink="true">http://www.perlfoundation.org/perl6/index.cgi?witch_dash</guid>
<pubDate>Tue, 23 Feb 2010 07:39:57 -0000</pubDate>
</item>

</channel>
</rss>