aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--challenge-002/sean-meininger/perl6/ch-1.p65
1 files changed, 5 insertions, 0 deletions
diff --git a/challenge-002/sean-meininger/perl6/ch-1.p6 b/challenge-002/sean-meininger/perl6/ch-1.p6
new file mode 100644
index 0000000000..3a4fd0b259
--- /dev/null
+++ b/challenge-002/sean-meininger/perl6/ch-1.p6
@@ -0,0 +1,5 @@
+my @numbers = <01 002 000 008 0234 55 03 1780>; #test cases for reference
+for @numbers {
+say "0" and next unless $_ ~~ /<-[0]> +/; #in case of zero(es)
+$_ ~~ /^^0+/ ?? say $/.postmatch !! put $_;
+}