Help for this page

Select Code to Download


  1. or download this
    use Modern::Perl;
    use Parse::Range qw(parse_range);
    say join  ' ', sort {$a <=> $b} parse_range('1-2a,27,150b-170,51d2,670
    +-675, 12, 90-97, 99-95');
    
  2. or download this
    12 27 90 91 92 93 94 95 96 97 98 99 670 671 672 673 674 675
    
  3. or download this
    non-numeric range: '1-2a' at c:/Data/strawberry/perl/site/lib/Parse/Ra
    +nge.pm line 54.
    non-numeric range: '150b-170' at c:/Data/strawberry/perl/site/lib/Pars
    +e/Range.pm line 54.
    non-numeric range: '51d2' at c:/Data/strawberry/perl/site/lib/Parse/Ra
    +nge.pm line 54.