in reply to shuffle a text file

Something like the following will read each line of the standard input, and randomize the columns. After all the rows are processed, they're printed out in random order.

use List::Util qw( shuffle ); my @lines; push @lines, join(' ', shuffle split) for <>; print "$_\n" for shuffle @lines;