sub median { $_[0]->[ @{$_[0]} / 2 ] } my @points = 0..100; print median(\@points), "\n";