/omake/shuffle
#!/usr/bin/perl # Shuffle stdin. Like 'sort', but not. :) # Solution shamelessly stolen from http://www.perlmonks.org/?node_id=625977 # If you read that article, you may want to first lay down plastic # sheets with which to capture the exploded pieces of your brain. push @a, $_ while <STDIN>; @x = 0..$#a; print @a[map splice(@x, rand @x, 1), @x];