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