From 7775ff4ca11d2be6ec6833e687af4cb3f3ea313e Mon Sep 17 00:00:00 2001 From: Jörg Sommrey <28217714+jo-37@users.noreply.github.com> Date: Tue, 15 Jun 2021 08:35:19 +0200 Subject: Solution to task 1 --- challenge-117/jo-37/perl/ch-1.pl | 139 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 139 insertions(+) create mode 100755 challenge-117/jo-37/perl/ch-1.pl diff --git a/challenge-117/jo-37/perl/ch-1.pl b/challenge-117/jo-37/perl/ch-1.pl new file mode 100755 index 0000000000..ad21fc4e73 --- /dev/null +++ b/challenge-117/jo-37/perl/ch-1.pl @@ -0,0 +1,139 @@ +#!/usr/bin/perl -s + +use v5.16; +use Test2::V0; +use warnings; +use autodie; +use experimental 'signatures'; + +our ($tests, $examples, $rows); + +run_tests() if $tests || $examples; # does not return + +die < =~ /^0*(\d+)(?=,)/mg}}; + + [sort {$a <=> $b} values %rows]; +} + +### Examples and tests + +sub run_tests { + SKIP: { + skip "examples" unless $examples; + + open my $fh, '<', \(<