If the original list is 2 elements, it's 50:50 that you'll get the original back. Is that the problem? :)
On 9 December 2013 11:49, Joel Bernstein <j...@fysh.org> wrote: > Assuming you didn't make a typo, don't forget that the original > configuration is one possible shuffling of the set... > > > On 9 December 2013 12:23, Kieren Diment <dim...@gmail.com> wrote: > > > In a short subroutine, this: > > > > use List::Util qw/shuffle/; > > my @list = @{$self->answer_list_orig_order}; > > @list = shuffle @list if $self->random_order; > > return \@list; > > > > does what's expected. Returns the shuffled list. > > > > This: > > > > use List::Util qw/shuffle/; > > my @list = @{$self->answer_list_orig_order}; > > @list = shuffle @list if $self->random_order; > > return \@list > > > > returns the list unshuffled. > > > > What's up with that? > > > > > -- Jasper