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