From caef8be004348b8426f7694d75a0f28eeae8b493 Mon Sep 17 00:00:00 2001 From: Jörg Sommrey <28217714+jo-37@users.noreply.github.com> Date: Tue, 23 Jan 2024 20:49:38 +0100 Subject: Solution to task 1 --- challenge-253/jo-37/perl/ch-1.pl | 62 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100755 challenge-253/jo-37/perl/ch-1.pl diff --git a/challenge-253/jo-37/perl/ch-1.pl b/challenge-253/jo-37/perl/ch-1.pl new file mode 100755 index 0000000000..70212982a6 --- /dev/null +++ b/challenge-253/jo-37/perl/ch-1.pl @@ -0,0 +1,62 @@ +#!/usr/bin/perl -s + +use v5.24; +use Test2::V0; + +our ($tests, $examples, $sep); + +run_tests() if $tests || $examples; # does not return + +die < "one.two.three","four.five","six")], + ["one","two","three","four","five","six"], 'example 1'; + is [split_strings('$' => '$perl$$', '$$raku')], + ["perl","raku"], 'example 2'; + } + + SKIP: { + skip "tests" unless $tests; + + is [split_strings(0 => qw(00aa00b00 00c00dd00))], + [qw(aa b c dd)], 'empty fields with zero separator'; + } + + done_testing; + exit; +} -- cgit