in reply to Re: Print series of numbers
in thread Print series of numbers

That is super sweet. It does boil down to essentially a one-liner.

#!/usr/bin/perl use strict; use warnings; use Set::IntSpan; my @list = (1, 2, 3, 6, 9, 10, 13, 22, 20, 19, 15, 21); my $rl = Set::IntSpan->new( \@list )->run_list(); print "$rl\n";