#!/usr/bin/perl -w use strict; sub avg { my $total; foreach (@_) { $total += $_; } print "This is the value of \$total: $total \n "; my $num = (@_); print "This is the value of \$num: $num \n"; return $total / $num; } sub above_avg { my $tot_avg = &avg(@_); print "This is the value of \$tot_avg $tot_avg \n"; my @product; foreach (@_) { if ($_ > $tot_avg) { (@product) = $_; } } print "This is the value of \@product @product \n"; return @product; } print "Please enter a series of numbers: "; my @entered = (); print "Here are the numbers above the average: ", &above_avg(@entered), "\n";