in reply to rearrange lines in file

I notice you call your output file '-randomize' which it is most certainly not. If you want to make a random arrangement of lines then do a Fisher-Yates Shuffle

open FILE, $file or die $!; my @array = <FILE>; close FILE; my $i = @array; while( $i-- ){ my $j=int rand(1+$i); next if $i == $j; @array[$i, $j]=@array[$j, $i] } open OUT, ">$out" or die $!; print OUT @array; close OUT:

Use Tie::File if you can't fit the entire file in an array in memory but don't expect if to finish in a hurry.

tachyon

s&&rsenoyhcatreve&&&s&n.+t&"$'$`$\"$\&"&ee&&y&srve&&d&&print