do you mean something like :
my @foo = (1..100); my @bar= sort {rand(1)<=>rand(1)} @foo; print "how many elements?"; my $num = <STDIN>; chomp $num; print join" ", @bar [(0..--$num)];
In reply to Re: random index in array - no duplicates
by boo_radley
in thread random index in array - no duplicates
by emilford
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |