in reply to number sequence

Here's one way of doing it:

my $comb = '18,5,1790,19-66,212,213'; $comb =~ s/-/../g; my @uns; push @uns, eval "($_)" foreach split ',', $comb; print join "\n", sort { $a <=> $b } @uns;
Of course, using eval like this, you have to be able to trust the source data not to contain any nasties.

HTH, andye