in reply to A Random Fortune Cookie

I think this will sort the whole file which is what the OP may have really wanted.

perl -MList::Util=shuffle -e '$/="\n%\n";print +(shuffle<>)' fortune.t +xt > randomised.txt

🦛