- or download this
# Global mode (pretty slow on large files)
$_=q qrea ncJertsa ,thelhPkour q,my $i=length;
while($i){s/(.{$i})(.)/$2$1/g;--$i}print+$_.$/
- or download this
# Non-global
$_=q qnPteorJlt hhascekaerru, q,my $i=length;
while($i){s/(.{$i})(.)/$2$1/;--$i}print+$_.$/;
- or download this
# Opposite code:
$_=q qJust another Perl hacker,q;until($i eq
length){s/(.)(.{$i})/$2$1/g;++$i}print+$_.$/