Shuffling (randomizing) the line order in a text file

shuffle.pl

#!/usr/bin/perl 

use List::Util 'shuffle'; 
@list = <STDIN>; 
print shuffle(@list); 
cat text.file | ./shuffle.pl > shuffled-text.file 

From here