Shuffling the array as suggested by BrowserUk and traveler is the Right Way To Do It™ but if you insist on removing elements from the array, how about
?perl -le '@a=1..200; print while $_ = splice @a, rand @a, 1'
-sauoq "My two cents aren't worth a dime.";
In reply to Re: Re: random number
by sauoq
in thread random number
by huskey
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |