[oak perl] A Simple Problem

David Fetter david at fetter.org
Tue Mar 1 15:28:19 PST 2005


On Tue, Mar 01, 2005 at 12:42:40PM -0800, Kester Allen wrote:
> I like the module solution:
> 
> use List::Util qw/sum/
> @numbers = qw/3 9 12 1 2/;
> $tot = sum ( @numbers );
> print $tot;

That's neat, and easy to read, besides :)

Cheers,
D
-- 
David Fetter david at fetter.org http://fetter.org/
phone: +1 510 893 6100   mobile: +1 415 235 3778

Remember to vote!


More information about the Oakland mailing list