use List::Util qw(shuffle); my $n = 10; # use $ARGV[0] or whatever to set $n print join " ", shuffle(1 .. $n);
In reply to Re: How can I print all the numbers from 1 to n in random order?
by ChrisS
in thread How can I print all the numbers from 1 to n in random order?
by vroom
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |