aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xchallenge-289/jo-37/perl/ch-2.pl17
1 files changed, 17 insertions, 0 deletions
diff --git a/challenge-289/jo-37/perl/ch-2.pl b/challenge-289/jo-37/perl/ch-2.pl
new file mode 100755
index 0000000000..905b9034e9
--- /dev/null
+++ b/challenge-289/jo-37/perl/ch-2.pl
@@ -0,0 +1,17 @@
+#!/usr/bin/perl
+
+use strict;
+use warnings;
+use List::Util 'shuffle';
+
+
+srand time;
+while (<>) {
+ print s{
+ (?<![[:alpha:]].)
+ (?<=[[:alpha:]])
+ ([[:alpha:]]{2,})
+ (?=[[:alpha:]])
+ (?!.[[:alpha:]])
+ }{join '', shuffle split //, $1}grex;
+}