I doing a Perl tutorial and I have a problem posed:
Create a library with a function that takes in an array of numbers (of arbitrary size). The function will then calculate the average of the numbers, the total of all of the numbers added together, and a new array of numbers which is comprised of the original input numbers each divided by 2. It will then return a new list with all of that information.
What I'm stuck on is how to write a script that creates the array and pass that to the library, completing the steps above. Anyone have similar examples?