@lines = ; shuffle(@lines); print OUT @lines; # or if 'shuffle' returns the shuffled list print OUT shuffle();