<?xml version="1.0" encoding="windows-1252"?>
<node id="1013585" title="Re^2: Two simple code style advice questions" created="2013-01-16 09:43:00" updated="2013-01-16 09:43:00">
<type id="11">
note</type>
<author id="171588">
BrowserUk</author>
<data>
<field name="doctext">
&lt;blockquote&gt;&lt;i&gt;&lt;/i&gt;&lt;/blockquote&gt;

&lt;p&gt;OK defined as 0? Yuck!

&lt;p&gt;That's as bad as defining TRUE as 0.

&lt;p&gt;It would be far clearer as:&lt;code&gt;
use constant NOERROR =&gt; 0;

my $errstr = ( $case != NOERROR ? $msg[$case] : "" );
&lt;/code&gt;

&lt;p&gt;Though I'd skip that conditional statement completely and embed the logic in the data:&lt;code&gt;
$msg[ 0 ] = ''; 

...

my $errstr = $msg[ $case ];
&lt;/code&gt;


&lt;div class="pmsig"&gt;&lt;div class="pmsig-171588"&gt;
&lt;hr /&gt;
&lt;font size=1 &gt;
&lt;div&gt;With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'&lt;/div&gt;
&lt;div&gt;Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.&lt;/div&gt;
&lt;div&gt;"Science is about questioning the status quo. Questioning authority". &lt;/div&gt;
&lt;div&gt;In the absence of evidence, opinion is indistinguishable from prejudice.
&lt;/div&gt;
&lt;/font&gt;

&lt;/div&gt;&lt;/div&gt;</field>
<field name="root_node">
1013548</field>
<field name="parent_node">
1013581</field>
</data>
</node>
