Roboticus has given you the answers to your questions, but I should stress these questions relate to really basic Perl operators, and that you should absolutely take a serious look at the documentation pointed by him in his answer (perlop). Also take a look at the documentation pointed out by toolic, especially perlintro.

Oft times I find that the best way to search for guidance, examples and solutions for Perl is simply to do a Google or DuckDuckGo search for precisely what I want. In this case, searching for 'perl average and mean calculator' gave me enough top level hits (including to nodes here at PM) to get started. Using SuperSearch works nicely as well, with just a bit more work...

Hope that is helpful...

...the majority is always wrong, and always the last to know about it...

Insanity: Doing the same thing over and over again and expecting different results...

A solution is nothing more than a clearly stated problem...otherwise, the problem is not a problem, it is a facct