Are all the elements of your array unqiue? Also, do you mind if the original array is altered? If your answers are "yes" and "no", respectively, then this alteration to your code will work.
for my $x (0..9)
{
my $element = splice(@quest,rand @quest,1);
print $element;
}