Help for this page
$number_set = "6 7 8 9 10";
$number_set = "6 7 8 9 10"; $number_set =~ s/ (?>(\d+)) ... /$1-$+/gx; # and replace it with the original $1, # a dash, and the last number matched