Acme-ELLEDNERA-Utils
view release on metacpan or search on metacpan
lib/Acme/ELLEDNERA/Utils.pm view on Meta::CPAN
$sum = sum(1, 2, 3);
$sum = sum(1.2, 3.14159);
$sum = sum( qw(t1 10 t2 5 6) ); # only performs 10+5+6 = 21
# shuffling an array
@ori_nums = (1, 3, 5, 7, 9, 11, 13, 15);
@shuffled = shuffle(@ori_nums);
=head1 EXPORT
None by default
=head1 SUBROUTINES
=head2 sum( LIST )
Obtains the sum of a list of numbers. If no numbers are passed in, it will return C<undef>.
A mixture of numbers and non-numerics will work too. However, complex and scientific
numbers are not supported.
The C<sum> subroutine in version 0.03 is broken
( run in 0.359 second using v1.01-cache-2.11-cpan-0a6323c29d9 )