aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xchallenge-166/jo-37/perl/ch-1.pl17
1 files changed, 17 insertions, 0 deletions
diff --git a/challenge-166/jo-37/perl/ch-1.pl b/challenge-166/jo-37/perl/ch-1.pl
new file mode 100755
index 0000000000..1453c835a7
--- /dev/null
+++ b/challenge-166/jo-37/perl/ch-1.pl
@@ -0,0 +1,17 @@
+#!/usr/bin/perl
+
+use v5.16;
+use warnings;
+
+$ARGV[0] ||= '../../../data/dictionary.txt';
+
+while (<>) {
+ chomp;
+ tr/olist/01157/;
+ next unless /^[0-9a-f]{2,8}$/;
+ # Allow a maximum of two lesser comprehensible letters.
+ # Force global match into list context, then convert to scalar.
+ # See "Goatse" in perlsecret.
+ next if 2 < (() = /[157]/g);
+ say "0x\u$_";
+}