sub above_mean { $i == mean(@list_of_numbers); foreach (@list_of_numbers) { if ($a > $i) { print "$a is above mean, which is mean(@list_of_numbers)"; } #........^ this is missing } #...^ so is this }