fork(1) download
  1. #!/usr/bin/perl
  2. use List::Util 'shuffle';
  3.  
  4. @words = split /\s+/, <>;
  5. print join ' ', map { join '', shuffle split//, $_ } @words;
  6. print "\n" . join ' ', @words;
Success #stdin #stdout 0s 3764KB
stdin
abab abab abab ab ab ab
abababaabbaabbaabb
stdout
baba abba abab ba ba ab
abab abab abab ab ab ab