in reply to How do I get my code to not repeat numbers and also sort the numbers
@bag = shuffle(@bag); my @values = sort { $a <=> $b } @bag[0..4]; [download]