in reply to Re^2: Pure variable confusion!
in thread Pure variable confusion!
@average is an array; don't you mean $average? And you have the opposite problem at the end of your program. Your function above_average returns an array, but you have the value assigned to a scalar. I suggest you take the time to learn how to use the debugger. There are links to tutorials in the Tutorials section here. One of the great things about the debugger is you can check the contents of variables to make sure they are what you expect, and you can experiment with alternate code to find the solution.
|
|---|