use Math::ConvexHull qw/convex_hull/; $hull_array_ref = convex_hull(\@points);