aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--challenge-117/luca-ferrari/raku/ch-1.p611
-rw-r--r--challenge-117/luca-ferrari/raku/test.txt14
2 files changed, 25 insertions, 0 deletions
diff --git a/challenge-117/luca-ferrari/raku/ch-1.p6 b/challenge-117/luca-ferrari/raku/ch-1.p6
new file mode 100644
index 0000000000..9f070c9a2a
--- /dev/null
+++ b/challenge-117/luca-ferrari/raku/ch-1.p6
@@ -0,0 +1,11 @@
+#!raku
+
+sub MAIN( Str $file-name = 'test.txt' ) {
+ my %lines = $file-name.IO.lines.map: { my ( $number, $content ) = .split( ',' );
+ $number.Int => $content.trim;
+ }
+
+ say "Missing line $_ !" if %lines{ $_ }:!exists
+ for 1 .. %lines.keys.sort( *.Int <=> *.Int )[ * - 1 ];
+
+}
diff --git a/challenge-117/luca-ferrari/raku/test.txt b/challenge-117/luca-ferrari/raku/test.txt
new file mode 100644
index 0000000000..5b9d9ab1ce
--- /dev/null
+++ b/challenge-117/luca-ferrari/raku/test.txt
@@ -0,0 +1,14 @@
+11, Line Eleven
+1, Line one
+9, Line Nine
+13, Line Thirteen
+2, Line two
+6, Line Six
+8, Line Eight
+10, Line Ten
+7, Line Seven
+4, Line Four
+14, Line Fourteen
+3, Line three
+15, Line Fifteen
+5, Line Five