use strict; use warnings; use Statistics::Lite qw(mean); my @data = (5, 10, 3, -20, 9); my $mean = mean @data; print $mean, "\n";