aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--challenge-111/simon-proctor/raku/ch-2.raku6
1 files changed, 6 insertions, 0 deletions
diff --git a/challenge-111/simon-proctor/raku/ch-2.raku b/challenge-111/simon-proctor/raku/ch-2.raku
new file mode 100644
index 0000000000..bc37b55523
--- /dev/null
+++ b/challenge-111/simon-proctor/raku/ch-2.raku
@@ -0,0 +1,6 @@
+#!/usr/bin/env raku
+
+#| Find the longest word in the given list that when sorted alphabetically is the same
+sub MAIN( $dict = "/etc/dictionaries-common/words" ) {
+ $dict.IO.lines.hyper.grep( { $_.lc ~~ $_.lc.split("").sort.join("") } ).sort( *.chars ).reverse.first.say;
+}