use Quantum::Superpositions; $max = any(@items) >= all(@items); $min = any(@items) <= all(@items);