note
robartes
<p>You're being bitten by the fact that 0 is false, so if you pass 0 in $db_write, the <code>shift || 1</code> sees <code>false || 1</code> and you get 1.</p>
<p>You will probably want to explicitely check for definedness instead:</p>
<code>
my $ref_mail = shift;
my $db_write = shift;
# If $db_write is defined, use that, otherwise default to 1
$db_write = defined($db_write)?$db_write:1;
</code>
<!-- Node text goes above. Div tags should contain sig only -->
<div class="pmsig"><div class="pmsig-201687">
<p>CU<br>Robartes-
</div></div>
573061
573061