aboutsummaryrefslogtreecommitdiff
path: root/challenge-040
diff options
context:
space:
mode:
authorJörg Sommrey <28217714+jo-37@users.noreply.github.com>2023-03-29 20:07:59 +0200
committerJörg Sommrey <28217714+jo-37@users.noreply.github.com>2023-04-19 17:15:36 +0200
commit88cd9db81d694e663c0289df888108b58647030a (patch)
treee01a1c931cc2d53fc1e7d31e3a19b4c250847c3e /challenge-040
parent95904ab68f94e48573efe43bc846314b3a799ce3 (diff)
downloadperlweeklychallenge-club-88cd9db81d694e663c0289df888108b58647030a.tar.gz
perlweeklychallenge-club-88cd9db81d694e663c0289df888108b58647030a.tar.bz2
perlweeklychallenge-club-88cd9db81d694e663c0289df888108b58647030a.zip
Challenge 040 task 1
Diffstat (limited to 'challenge-040')
-rwxr-xr-xchallenge-040/jo-37/perl/ch-1.pl19
1 files changed, 19 insertions, 0 deletions
diff --git a/challenge-040/jo-37/perl/ch-1.pl b/challenge-040/jo-37/perl/ch-1.pl
new file mode 100755
index 0000000000..39fbbb6e30
--- /dev/null
+++ b/challenge-040/jo-37/perl/ch-1.pl
@@ -0,0 +1,19 @@
+#!/usr/bin/perl -s
+
+use v5.16;
+use warnings;
+use List::MoreUtils 'zip6';
+
+die <<EOS unless @ARGV;
+usage: $0 [LIST...]
+
+LIST...
+ one or more lists of "items". Items are separated by comma
+ and / or blanks.
+
+EOS
+
+
+# Split arguments at comma/space and combine the items from each list.
+# Need to circumvent zip6's prototype.
+say "@$_" for &zip6(map [split /[ ,]\s*/, $_], @ARGV);