Help for this page
my @nums = (5, 10, 15, 20, 25);
my $totalSum = 0; $totalSum += $_ for @nums;
use List::Util 'sum'; my $totalSum = sum @nums;
my @array = map { $_ / $totalSum } @nums;