You can replace the map with a simple for loop.
my @array; push @array, $_ / $totalSum for @nums;
🦛
In reply to Re^3: Finding sum of numbers and storing it an Array
by hippo
in thread Finding sum of numbers and storing it an Array
by shabird
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |