<?xml version="1.0" encoding="windows-1252"?>
<node id="980659" title="Re: ||= (poorly documented?)" created="2012-07-09 02:36:56" updated="2012-07-09 02:36:56">
<type id="11">
note</type>
<author id="961">
Anonymous Monk</author>
<data>
<field name="doctext">
Yep, that is right and it works the way it reads.
&lt;code&gt;
perl -e "my $shoo = 50; $shoo ||= 100; print $shoo;"
&lt;/code&gt;
Prints
&lt;code&gt;
50
&lt;/code&gt; 
Should be the same as,
&lt;code&gt;
perl -e "$shoo=50; $shoo = ($shoo)?50 : 100;print $shoo;"
&lt;/code&gt;
If you scroll down in perlop you'll see that style used to describe what &lt;code&gt;//&lt;/code&gt; does, so they appear to be equivalent.
&lt;!-- Node text goes above. Div tags should contain sig only --&gt;
&lt;div class="pmsig"&gt;&lt;div class="pmsig-45622"&gt;
&lt;P&gt;&lt;I&gt;Celebrate Intellectual Diversity&lt;/I&gt;
&lt;/div&gt;&lt;/div&gt;</field>
<field name="root_node">
980650</field>
<field name="parent_node">
980650</field>
<field name="reputation">
9</field>
</data>
</node>
