aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--challenge-096/abigail/perl/ch-1.pl33
1 files changed, 33 insertions, 0 deletions
diff --git a/challenge-096/abigail/perl/ch-1.pl b/challenge-096/abigail/perl/ch-1.pl
new file mode 100644
index 0000000000..ddca656054
--- /dev/null
+++ b/challenge-096/abigail/perl/ch-1.pl
@@ -0,0 +1,33 @@
+#!/opt/perl/bin/perl
+
+use 5.032;
+
+use strict;
+use warnings;
+no warnings 'syntax';
+
+use experimental 'signatures';
+use experimental 'lexical_subs';
+
+#
+# For the challenge description, see ../README.md
+#
+
+#
+# The challenge doesn't describe what a word is, or what to
+# do with things which are neither words, nor whitespace, like
+# punctuation.
+#
+# For instance, what should happen to the sentence:
+#
+# "The Weekly Challenge, Part 1!"
+#
+# So, we're using the easy way out, and assume anything which isn't
+# whitespace to be part of a word. After all, the examples assumen
+# all the world is ASCII letters and spaces.
+#
+# Which makes the excercise too trivial to be called a challenge.
+#
+
+# Extract 'words', reverse the list, and print it.
+say join " " => reverse /\S+/g for <>;