<?xml version="1.0" encoding="windows-1252"?>
<node id="80113" title="Re: &quot;Junkyard&quot; Puzzle: Average of Numbers" created="2001-05-13 22:04:50" updated="2005-07-19 14:08:39">
<type id="11">
note</type>
<author id="45414">
jmcnamara</author>
<data>
<field name="doctext">
&lt;br&gt;
This is 37 chars. I saw [Abigail] do something like this on clpmisc:
&lt;code&gt;    sub average1 {
        local$"="+";eval("@{$_[0]}")/@{$_[0]}
    }
&lt;/code&gt;
This looks prettier when dealing with an ordinary list:
&lt;code&gt;    sub average2 {
        local$"="+";eval("@_")/@_
    }
&lt;/code&gt;

In which case this would be shorter:
&lt;code&gt;    sub average3 {
        eval(join"+",@_)/@_
    }
&lt;/code&gt;
The last one is the same as [no_slogan]'s.

&lt;br&gt;
&lt;br&gt;
John.
&lt;br&gt;
-- 
&lt;br&gt;</field>
<field name="root_node">
79981</field>
<field name="parent_node">
79981</field>
</data>
</node>
