Does line c sortlead to a more random array or is sortit just waste?
sort
use List::Util qw(shuffle); @random1 = shuffle sort keys %vocables; @random2 = shuffle keys %vocables;
If you put the sort before the shuffle changes, then the shuffle will be broken. Since shuffle works, sorting is a waste of processor time. The whole point of a good shuffle is to eliminate any pre-existing ordering of elements.
“Variety” does not make it more random and represents waste