Re: how to add a list of numbers



On 7/15/06, I BioKid <ibiokid@xxxxxxxxx> wrote:
is there any shortest way to add a list of random numbers ?
for example :
11
1
250
39
100

my $results;
while(<DATA>){
s|\s+||g;
$results += $_;
}

print $results;
__END__
11
2
250
39


--
WC (Bill) Jones -- http://youve-reached-the.endoftheinternet.org/
.