in reply to Finding missing numbers in a list
Set::IntSpan offers some nice features:
prints outuse Set::IntSpan; my $set = Set::IntSpan->new("41888, 41889, 41890, 41892, 41895"); $set = $set->complement()->intersect( Set::IntSpan->new($set->min . "-" . $set->max)); print $set->run_list(), "\n";
41891,41893-41894
|
---|
In Section
Seekers of Perl Wisdom