grigoris Astronomy July 1, 2013 June 24, 2015 Used in a Perl script so I noted now because I will totally forget how to use it! use List::Util qw(shuffle) my @coef = (-2..2); my @random_coef = shuffle @coef; Thanks to Alexandros M. for this tip!