aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMohammad S Anwar <Mohammad.Anwar@yahoo.com>2021-02-02 09:16:33 +0000
committerGitHub <noreply@github.com>2021-02-02 09:16:33 +0000
commitdadd7d8d1ba598bcb070a01865075173d46c3a28 (patch)
tree855e715eb262dc92e44cfff1cf603336a16ea9c7
parentf2e2075a97182b2ba8333435188111f173f872dd (diff)
parente6ca31db9e78b036b689498efb3441f84c4cb8e2 (diff)
downloadperlweeklychallenge-club-dadd7d8d1ba598bcb070a01865075173d46c3a28.tar.gz
perlweeklychallenge-club-dadd7d8d1ba598bcb070a01865075173d46c3a28.tar.bz2
perlweeklychallenge-club-dadd7d8d1ba598bcb070a01865075173d46c3a28.zip
Merge pull request #3440 from stuart-little/stuart-little_098_perl
1st commit on 098_perl
-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]);