in reply to Re: Answer: How can I print all the numbers from 1 to n in random order?
in thread How can I print all the numbers from 1 to n in random order?
which adds keys until it gets a collision. Be prepared to wait a very long time.perl -wle'undef $x{rand()} while keys(%x) == $x++; print $x'
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: Answer: How can I print all the numbers from 1 to n in random order?
by halley (Prior) on Apr 23, 2004 at 14:50 UTC | |
by ysth (Canon) on Apr 23, 2004 at 16:30 UTC |