aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xchallenge-098/stuart-little/perl/ch-1.pl13
-rwxr-xr-xchallenge-098/stuart-little/perl/ch-2.pl10
2 files changed, 23 insertions, 0 deletions
diff --git a/challenge-098/stuart-little/perl/ch-1.pl b/challenge-098/stuart-little/perl/ch-1.pl
new file mode 100755
index 0000000000..2a464bdf46
--- /dev/null
+++ b/challenge-098/stuart-little/perl/ch-1.pl
@@ -0,0 +1,13 @@
+#!/usr/bin/perl
+use warnings;
+use v5.12;
+
+# run <script> <path-to-file> <number>
+
+use feature qw(signatures);
+no warnings qw(experimental::signatures);
+
+open my $fh, "<", $ARGV[0];
+read $fh, my $txt, $ARGV[1];
+say $txt;
+
diff --git a/challenge-098/stuart-little/perl/ch-2.pl b/challenge-098/stuart-little/perl/ch-2.pl
new file mode 100755
index 0000000000..c1c50de86f
--- /dev/null
+++ b/challenge-098/stuart-little/perl/ch-2.pl
@@ -0,0 +1,10 @@
+#!/usr/bin/perl
+use warnings;
+use v5.12;
+
+# run <script> <target> <space-separated array entries>
+
+use feature qw(signatures);
+no warnings qw(experimental::signatures);
+
+say scalar(grep {$_ < $ARGV[0]} @ARGV[1..$#ARGV]);