aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--challenge-185/happy-barney/perl/ch-2-split.pl14
1 files changed, 14 insertions, 0 deletions
diff --git a/challenge-185/happy-barney/perl/ch-2-split.pl b/challenge-185/happy-barney/perl/ch-2-split.pl
new file mode 100644
index 0000000000..d3d8c846a1
--- /dev/null
+++ b/challenge-185/happy-barney/perl/ch-2-split.pl
@@ -0,0 +1,14 @@
+#!/usr/bin/env perl
+
+use strict;
+use warnings;
+
+sub challenge_185_2 {
+ my (@codes) = @_;
+
+ my $count = 4;
+ my $mask = 'x';
+
+ map { join 'x', split qr/[a-z0-9]/, $_, 4 +1 } @codes;
+}
+