use strict; use warnings; use List::Util qw( shuffle ); my @random = shuffle 0..99999; print join "\n", @random[0..9];