Help for this page

Select Code to Download


  1. or download this
    use v5.14;
    use warnings;
    ...
    while (my ($c,$r) = splice @matches,0,2) {
      say "$c - $r";
    }
    
  2. or download this
    INPUT: 11 12 13 14 15 16 17 18 19
    11 - 12
    13 - 14
    15 - 16
    17 - 18
    
  3. or download this
    use v5.14;
    use warnings;
    ...
      say "$c $r";
      die unless $stop--;
    }
    
  4. or download this
    INPUT: 1 2 3 4 5 6 7 8 9
    1 2