On Sun, Sep 10, 2006 at 07:12:08AM -0700, chen li wrote:
>  
>  2)List::Util is "built-in" as of 5.8, and back
> compatible to 5.5 
> 
>   use List::Util qw(sum);
> 
>   my $average = sum(@input) / @input;
> 
> 
> 6)$mean = eval(join("+", @data)) / @data;
> 
> Depending on how you understand Perl and what progress
> you are I prefer 6).

I prefer 2, personally.  A C library for something like this strikes me
as optimal.

-- 
CCD CopyWrite Chad Perrin [ http://ccd.apotheon.org ]
"The ability to quote is a serviceable
substitute for wit." - W. Somerset Maugham

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to