diff options
| author | Jörg Sommrey <28217714+jo-37@users.noreply.github.com> | 2024-10-04 13:21:34 +0200 |
|---|---|---|
| committer | Jörg Sommrey <28217714+jo-37@users.noreply.github.com> | 2024-10-04 16:35:19 +0200 |
| commit | 43cd4fb9132ad166678c60909d2de3eacff39a12 (patch) | |
| tree | 9e9702f85b9a21b7e94f4a25973038eb558aabdf /challenge-289/jo-37 | |
| parent | 1b91ff7997d2e7782f0154161a0c10a8be8a1d69 (diff) | |
| download | perlweeklychallenge-club-43cd4fb9132ad166678c60909d2de3eacff39a12.tar.gz perlweeklychallenge-club-43cd4fb9132ad166678c60909d2de3eacff39a12.tar.bz2 perlweeklychallenge-club-43cd4fb9132ad166678c60909d2de3eacff39a12.zip | |
Solution to task 2
Diffstat (limited to 'challenge-289/jo-37')
| -rwxr-xr-x | challenge-289/jo-37/perl/ch-2.pl | 17 |
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; +} |
