in reply to Re^2: Finding sum of numbers and storing it an Array
in thread Finding sum of numbers and storing it an Array
You can replace the map with a simple for loop.
my @array; push @array, $_ / $totalSum for @nums;
🦛
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Finding sum of numbers and storing it an Array
by shabird (Sexton) on Sep 21, 2020 at 09:51 UTC |