<?xml version="1.0" encoding="windows-1252"?>
<node id="162624" title="Re: Re: passing arguments in a dispatch table" created="2002-04-28 02:19:57" updated="2005-07-19 14:08:11">
<type id="11">
note</type>
<author id="85412">
CharlesClarkson</author>
<data>
<field name="doctext">
&lt;p&gt;You misunderstand. I was not trying to pass arguments &lt;em&gt;after&lt;/em&gt; the dispatch table was defined. I was trying to pass arguments predefined in the dispatch table. In the example I gave &lt;code&gt;$fruit&lt;/code&gt; was the argument. If I use &lt;code&gt;\&amp;add_entry( $fruit )&lt;/code&gt;, perl will run &lt;code&gt;add_entry( $fruit )&lt;/code&gt; immediately and return a reference to it's return. But &lt;code&gt;$fruit&lt;/code&gt; might change before &lt;code&gt;add_entry&lt;/code&gt; is dispatched or between dispatched calls. The point was to define the arguments in the table not afterward.&lt;/p&gt;
&lt;p&gt;The problem was that this solution is skipped in the dipatch table examples I found online and in books. Some examples intimated that passing arguments from the table was difficult. I found the answer so easy, I thought I had missed something.&lt;/p&gt;
&lt;BR&gt;
HTH,&lt;BR&gt;
Charles K. Clarkson&lt;BR&gt;
Clarkson Energy Homes, Inc.&lt;br&gt;
</field>
<field name="root_node">
162577</field>
<field name="parent_node">
162591</field>
</data>
</node>
