Help for this page

Select Code to Download


  1. or download this
    $number_set = "6 7 8 9 10";
    
  2. or download this
    $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