diff options
| author | Francis Whittle <code@powered.ninja> | 2019-09-09 08:45:45 +1000 |
|---|---|---|
| committer | Francis Whittle <code@powered.ninja> | 2019-09-09 08:46:17 +1000 |
| commit | ffc99d05669cd8a6b513366d14b76524fbe1d818 (patch) | |
| tree | 693c771642bb2e915b62011946ed6664804ae17f | |
| parent | 5b06d0027a36df1fb156321e1829d48497e04480 (diff) | |
| download | perlweeklychallenge-club-ffc99d05669cd8a6b513366d14b76524fbe1d818.tar.gz perlweeklychallenge-club-ffc99d05669cd8a6b513366d14b76524fbe1d818.tar.bz2 perlweeklychallenge-club-ffc99d05669cd8a6b513366d14b76524fbe1d818.zip | |
fjwhittle Challenge 024 solutions
| -rw-r--r-- | challenge-024/fjwhittle/perl6/ch-1.p6 | 0 | ||||
| -rw-r--r-- | challenge-024/fjwhittle/perl6/ch-2.p6 | 12 |
2 files changed, 12 insertions, 0 deletions
diff --git a/challenge-024/fjwhittle/perl6/ch-1.p6 b/challenge-024/fjwhittle/perl6/ch-1.p6 new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/challenge-024/fjwhittle/perl6/ch-1.p6 diff --git a/challenge-024/fjwhittle/perl6/ch-2.p6 b/challenge-024/fjwhittle/perl6/ch-2.p6 new file mode 100644 index 0000000000..1b0dc9bb6e --- /dev/null +++ b/challenge-024/fjwhittle/perl6/ch-2.p6 @@ -0,0 +1,12 @@ +unit sub MAIN (*@file); + +my %index; + +for @file.map(*.?IO).grep({.?f && .?r}) -> $file { + %index.push: + $file.comb(/\w+/, :match).hyper.map({ .Str.fc => $($file.path => .pos,) }); +} + +while my $word = prompt 'Find? ' { + %index{$word.fc}ยป.say; +} |
