aboutsummaryrefslogtreecommitdiff
path: root/challenge-034
diff options
context:
space:
mode:
authorJörg Sommrey <28217714+jo-37@users.noreply.github.com>2023-03-29 19:18:34 +0200
committerJörg Sommrey <28217714+jo-37@users.noreply.github.com>2023-04-19 17:15:36 +0200
commit95904ab68f94e48573efe43bc846314b3a799ce3 (patch)
tree34429111fc89ba6793c59c17e580084a3511b9fb /challenge-034
parente29228ede8c5d919f222d0e9084698b77e6fbe73 (diff)
downloadperlweeklychallenge-club-95904ab68f94e48573efe43bc846314b3a799ce3.tar.gz
perlweeklychallenge-club-95904ab68f94e48573efe43bc846314b3a799ce3.tar.bz2
perlweeklychallenge-club-95904ab68f94e48573efe43bc846314b3a799ce3.zip
Challenge 034 task 2
Diffstat (limited to 'challenge-034')
-rwxr-xr-xchallenge-034/jo-37/perl/ch-2.pl23
1 files changed, 23 insertions, 0 deletions
diff --git a/challenge-034/jo-37/perl/ch-2.pl b/challenge-034/jo-37/perl/ch-2.pl
new file mode 100755
index 0000000000..381e70decf
--- /dev/null
+++ b/challenge-034/jo-37/perl/ch-2.pl
@@ -0,0 +1,23 @@
+#!/usr/bin/perl
+
+use strict;
+use warnings;
+
+main: {
+ my @dispatch = (
+ sub {print 'The'; 7},
+ sub {print '034'; 6},
+ sub {print '2'; 3},
+ sub {print 'by'; 5},
+ sub {print 'challenge'; 1},
+ sub {print 'jo.'; undef},
+ sub {print 'task'; 2},
+ sub {print 'weekly'; 4},
+ );
+
+ for (my $i = 0; defined $i; $i = $dispatch[$i]()) {
+ print ' ' if $i;
+ }
+ print "\n";
+}
+