<?xml version="1.0" encoding="windows-1252"?>
<node id="875371" title="Re: logic problem with perl game" created="2010-12-04 09:38:22" updated="2010-12-04 09:38:22">
<type id="11">
note</type>
<author id="603247">
apl</author>
<data>
<field name="doctext">
You should consider changing
&lt;code&gt;
    {
        $shield=param('shield');
        $correctryhm=param('correctryhm');
        $response=param('response');
        $win=param('win');
        $win=$win+1;
    }
&lt;/code&gt;
&lt;p&gt;to&lt;p&gt;
&lt;code&gt;
    { 
      $shield = param( 'shield' );
      process();
    }

    # ....

    sub process
    {
        $correctryhm = param('correctryhm');
        $response    = param('response');
        $win         = param('win');
        $win=$win+1;
    }
&lt;/code&gt;
&lt;P&gt;This will reduce the size of your code.</field>
<field name="root_node">
875306</field>
<field name="parent_node">
875306</field>
</data>
</node>
