File tree Expand file tree Collapse file tree 3 files changed +5
-3
lines changed Expand file tree Collapse file tree 3 files changed +5
-3
lines changed Original file line number Diff line number Diff line change 43
43
==> $ result ;
44
44
45
45
# print result
46
- $ result . say ;
46
+ $ result . [ 0 ] . say ;
47
47
48
48
# vim: expandtab shiftwidth=4 ft=perl6
Original file line number Diff line number Diff line change @@ -25,10 +25,11 @@ ($input-file = Nil)
25
25
my ($ dna , $ search ) = $ input-file ?? $ input-file . IO . lines !! @ default-data ;
26
26
27
27
my $ pos = 0 ;
28
- say gather for $ search . comb -> $ c {
28
+ my @ arr = gather for $ search . comb -> $ c {
29
29
$ dna ~~ m :c ($ pos )/ $ c / ;
30
30
take $ pos = $/ . from + 1 ;
31
31
}
32
+ say " { @ arr } "
32
33
}
33
34
34
35
# vim: expandtab shiftwidth=4 ft=perl6
Original file line number Diff line number Diff line change 23
23
24
24
sub MAIN ($ input-file = Nil ) {
25
25
my ($ S , $ t ) = $ input-file ?? $ input-file . IO . lines !! @ default-data ;
26
- say gather for $ S . match (/$ t /, : overlap) { take 1 +. from };
26
+ my @ arr = gather for $ S . match (/$ t /, : overlap) { take 1 +. from };
27
+ say " { @ arr } "
27
28
}
28
29
29
30
# vim: expandtab shiftwidth=4 ft=perl6
You can’t perform that action at this time.
0 commit comments