in reply to Randomly picking numbers
This will move a random number from @arr into $num, which may or may not be what you want. It will also shuffle the contents of @arr, so caveat emptor.use List::Util 'shuffle'; @arr = shuffle(@arr); my $num = shift @arr;
|
|---|