aboutsummaryrefslogtreecommitdiff
path: root/challenge-076
diff options
context:
space:
mode:
authorMohammad S Anwar <Mohammad.Anwar@yahoo.com>2020-09-04 01:37:22 +0100
committerGitHub <noreply@github.com>2020-09-04 01:37:22 +0100
commit3d79bb56f9da97457b22b3eff5cfafd73e5cfd91 (patch)
treee316a4f4fe70daaf42da5c853cb5792a35a02747 /challenge-076
parent268e5427c5702fcf6ab3626c0ca5492075a93f9e (diff)
parente8f14facf014ee3483edfb70e97bb65ca20aabc6 (diff)
downloadperlweeklychallenge-club-3d79bb56f9da97457b22b3eff5cfafd73e5cfd91.tar.gz
perlweeklychallenge-club-3d79bb56f9da97457b22b3eff5cfafd73e5cfd91.tar.bz2
perlweeklychallenge-club-3d79bb56f9da97457b22b3eff5cfafd73e5cfd91.zip
Merge pull request #2199 from holli-holzer/master
comb can take a matcher. d'oh
Diffstat (limited to 'challenge-076')
-rw-r--r--challenge-076/markus-holzer/raku/ch-2.raku5
1 files changed, 2 insertions, 3 deletions
diff --git a/challenge-076/markus-holzer/raku/ch-2.raku b/challenge-076/markus-holzer/raku/ch-2.raku
index 5847a91ed5..28e90a4d17 100644
--- a/challenge-076/markus-holzer/raku/ch-2.raku
+++ b/challenge-076/markus-holzer/raku/ch-2.raku
@@ -1,9 +1,8 @@
unit sub MAIN($words-file, $board-file);
my @words = $words-file.IO.lines;
-my @board = $board-file.IO.slurp.subst( ' ', :g ).lines;
-my $width = @board.head.chars;
-my @chars = @board.map: |*.comb;
+my $width = $board-file.IO.lines.head.chars div 2 + 1;
+my @chars = $board-file.IO.slurp.comb( /\w/ );
.Str.say for words-in rotated-data.flat.join;