use Parse::Range qw(parse_range); my $a=('1 3-6 9-13'); print $a,"\n"; my@b=split / /, $a; my$c=join ",",@b; #muss halt so aussehen: '1,3-6,8-13'; my @range=parse_range($c); print @range, "\n"; print $range[2];