Well, you can add a list of numbers with the module List::Util . It
has a routine called "sum".
my @list = (8,10,2,5);
use List::Util qw(sum);
my $sum = sum (@list);
# $sum is now 25
It can add any numbers, random or not.
On Jul 14, 2006, at 11:00 PM, I BioKid wrote:
is there any shortest way to add a list of random numbers ?
for example :
11
1
250
39
100
....
,....
thanks
--
ibiokid
--
Aaron Priven, [EMAIL PROTECTED], http://www.priven.com/aaron
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>