<?xml version="1.0" encoding="windows-1252"?>
<node id="496032" title="Re: True or False? A Quick Reference Guide" created="2005-09-29 06:15:37" updated="2005-09-29 02:15:37">
<type id="11">
note</type>
<author id="268515">
xdg</author>
<data>
<field name="doctext">
&lt;p&gt;It's worth mentioning this tidbit I picked up from HOP:  &lt;code&gt;'0 but true'&lt;/code&gt; is a special-case that will not issue a warning when used in a numeric context.
&lt;/p&gt;
&lt;code&gt;
$ perl -we 'print "0 but true" + 2'
2

$ perl -we 'print "0 but actually true" + 2'
Argument "0 but actually true" isn't numeric in addition (+) at -e line 1.
2
&lt;/code&gt;

&lt;div class="pmsig"&gt;&lt;div class="pmsig-268515"&gt;
&lt;p&gt;-xdg&lt;/p&gt;
&lt;p&gt;&lt;small&gt;&lt;i&gt;Code written by xdg and posted on PerlMonks is &lt;a href="http://creativecommons.org/licenses/publicdomain"&gt;public domain&lt;/a&gt;. It is provided &lt;b&gt;as is&lt;/b&gt; with no warranties, express or implied, of any kind. Posted code may not have been tested. Use of posted code is at your own risk.&lt;/i&gt;&lt;/small&gt;&lt;/p&gt;
&lt;/div&gt;&lt;/div&gt;</field>
<field name="root_node">
495975</field>
<field name="parent_node">
495975</field>
</data>
</node>
