Word Scrambler, Write-Only Version
Traduction: [ Google | Babelfish ]
Catégories : [ Informatique ]
Here's a more compact, less readable version of the scramble function:
sub scramble { return $_[0] if $_[0] =˜ /ˆ[A-Z]/; my @l = split //,$_[0]; @l[1..$#l-1] = sort { rand(1) < 0.5 ? -1 : 1 } @l[1..$#l-1]; return join("", @l); }